local UT = game.Players.LocalPlayer.Backpack:findFirstChild("Tool").UtilityTag if UT == nil then --IDK what I'm actually doing but I'm just trying to see if that player's tool has the tag (it's a frame). print("true") else print("false") end
Assuming I read your question right, you can't use Tool as what you are looking for, you need to check if the class is a tool, but finding tool would be too much for the server because there might be more than one tool. You should use this script:
for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) if v:IsA("Tool") do if not v:FindFirstChild("UtilityTag") then v:Destroy() end end end
What that means in English is
check everything inside the local player's backpack, if the part we are checking is a tool, then if you can't find a utility tag, then destroy it.
Hope I helped.
Thanks @cmgtotalyawesome there were a few errors in your script through.
for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) --Needed a ")" do if v:IsA("Tool") then --"Do" needed apparently if not v:FindFirstChild("UtilityTag") then v:Destroy() end end end --No ")" needed.
Thanks btw! :D