Forum > Coding >

Request | Tool Delete Script with a check

Posts: 181

Threads: 22

Joined: Jul, 2021

Reputation: -20

Posted

I need a script that removes/deletes (NOT DROPS THE TOOLS) all of the tools expect one of the tools i have

 

is there a script that removes all tools expect 1 that i can choose too not be deleted?

 

The reasone i need it is because my kill script works only on 1 tool and the kill script uses other tools that dont work with the kill script.

  • 0

tar

CoolNickname

Posts: 119

Threads: 11

Joined: Jul, 2021

Reputation: 1

Replied

for i,v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do
    if v.Name ~= "ToolYouDontWantToRemove" then
        v:Destroy()
    end
end
  • 1

https://imgur.com/a/oOomuUo

Posts: 181

Threads: 22

Joined: Jul, 2021

Reputation: -20

Replied

@tar GREAT! IT WORKED THANKS!

 

couldnt find this anywhere i tried searching soo many times

  • 0

Users viewing this thread:

( Members: 0, Guests: 1, Total: 1 )