i need a script so that if a a object with a class name of "tool" is inside a player character it deletes it
i have this script but it does't do anything
local player = game.Players.LocalPlayer
local character = player.Character
local child = character:GetChildren()
if child.ClassName == "Tool" then
child:delete()
end
no errors in the output, this is a part of a local script inside the text button

3 comments
i need this for a shop script i have, it delets everything in player backpack but when an tool is equipped the tool is inside the character so i cant delete it
https://wiki.roblox.com/index.php?title=API:Class/Instance/ClassName Try using that!
thanks but din't work