Hello! I have a script which removing hats, but when you click it, script removing hat for everyone. My script is in local script, I had it first in normal script but it works worse. One more thing, script works in GUI in textbutton. How can I fix this?
This is this script
script.Parent.MouseButton1Click:connect(function()
local w = game.Workspace:GetChildren()
for i = 1, #w do
local c = w[i]:GetChildren()
for i=1, #c do
if (c[i].className == "Accessory") then
c[i]:remove()
end
end
end
end)

2 comments
Works! Thank you very much
No problem!