Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Remove everyones Hat?

I attempted to make a script (I'm not the best ) that removes all players hats, and constantly checks for hats, But will not remove hats with names from a table.

save{mask1}
plr = script.Parent.Parent.Character
H = plr:WaitForChild("Hat")
H:remove()
elseif H.name == save then
end

1 answer

✓ Accepted answer
for i,v in next,game.Players:getChildren() do
	for o,b in next,v.Character:getChildren() do
		if b.className=="Hat" then
			b:Destroy()
		end
	end
end 

Next time, don't attempt to make up a random code by "save{mask1}"

4 comments

0

First, i said i wasnt a good scripter, and i also said i was trying to tableizle names of the hats i dont want to be destroyed.

0

Then you failed badly on titling. Remove everyones Hat?

0

i explained in the description

0

Although this isn't a requesting website, You should be able to do the rest by pure information from wiki.roblox.com

This discussion is preserved as it was. New answers, comments, and votes are closed.