I want to be able to delete hats locally. I have been told something about "Super Classes", but I just want to delete hats. May I have any help?
Sorry, what I specifically want to do is remove a player's hats when they click a GUI. I have the function already set, but how would I incorporate the LocalPlayer's hats being removed?
Hats = Workspace:GetChildren() function RemoveHats() for i,v in pairs (Hats) do if v.ClassName == "Hat" then v:remove() end end while wait(3) do RemoveHats() end --This script would remove all the Hats in Workspace each 3 seconds , at least that's what it should do.
Hope it helps.
You can use the IsA
method. Here's an example.
if workspace.Part:IsA("Hat") then workspace.Part:Destroy() end
And it'll check for the class of the part in Workspace
Well just find and define the location of the hats say for local hat = game.Workspace.putnamehere and then just hat:Remove()