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

Remove everyones Hat?

Asked by 8 years ago

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

Log in to vote
0
Answered by
Nickoakz 231 Moderation Voter
8 years ago
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}"

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. ghosteffectz 115 — 8y
0
Then you failed badly on titling. Remove everyones Hat? Nickoakz 231 — 8y
0
i explained in the description ghosteffectz 115 — 8y
0
Although this isn't a requesting website, You should be able to do the rest by pure information from wiki.roblox.com Nickoakz 231 — 8y
Ad

Answer this question