Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to check if something is in the backpack, then remove something from the backpack?

Asked by 9 years ago

How do I check if a certain tool is in the backpack, then get rid of something from the backpack? Help possibly?

1
This isn't really a request site, if you were to make an attempt at it we could help fix it but you cannot just request a script VariadicFunction 335 — 9y
0
Look up for loops, FindFirstChild, and if statements on the wiki. Perci1 4988 — 9y

1 answer

Log in to vote
0
Answered by
Thetacah 712 Moderation Voter
9 years ago

Put this Script into the Starterpack

Players = game.Players:GetPlayers()
while(true) do
    wait(1)
    print("Hai")
    for i,v in pairs(Players) do
        print("Howdy")
        if v.Backpack:FindFirstChild("ToolName") then
            print("Hey")
        v.Backpack:FindFirstChild("ToolName"):Destroy()
        print("Done")
        end
    end
end
Ad

Answer this question