Im new to scripting but im learning....
im trying to create a script that removes clothes,hats,pants from players at the start. ive come up with this:
player = script.Parent.Parent
mouse = player:GetMouse()
character = player.Character
wait(0.1)
print(character)
wait(5)
character.Pants:Remove()
character.Shirt:Remove()
hat = character.Hat
hat:Remove()
my problem is the following:
hats tend to have diffrent names (mine is: WizardHatWithBeard) so doing
character.Hat:Remove()
wont work. Doing...
character:GetFirstChild("Hat")
wont work either.
So is there a way to search for the specific class? like removing all shirts, pants, hats

1 comment
Thanks! :)