Now, It's a simple question. I just need help how to.
✓ ANSWER ACCEPTED
How do you remove a hat from a player?
2 answers
✓ Accepted answer
What Shawnyg said should work.
I'll give you another way to do what you want to do.
function removehats()
for i, v in pairs(game.Players:GetChildren()) do
wait()
for i, t in pairs(v.Character:GetChildren()) do
if t:IsA("Hat") then
t:Destroy()
end
end
end
end
while true do
wait(2)
removehats()
end
I apologize for the spacing as I just did this without studio
game.Players.PlayerAdded:connect(function(p)
p.CharacterAdded:connect(function(char)
for i,v in pairs(char:GetChildren()) do
if v:IsA("Hat") then
v:Destroy()
end
end
end)
end)
This discussion is preserved as it was. New answers, comments, and votes are closed.
