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

How would you remove/add hats to a character?

I'm trying to make a script that gives you an automatic set of hats, and removes the ones you were previously wearing. How would you add a hat to the character in which it would not just fall down to the bottom of the game? Any help with this would be very much appreciated.

1 answer

✓ Accepted answer

This is just a reference on how to make the hat teleport to the player!

local clone = game.Lighting.Hat:Clone()


local plyr = game.Players.Player1 -- Change Player1 to the desired player
clone.Parent = game.Workspace

if clone.Handle.Position ~= plyr.Character.Head.Position then
clone.Handle.Position = plyr.Character.Head.Position 

end

This is hopefully right and should be used only as a reference!

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