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

How would you remove/add hats to a character?

Asked by 10 years ago

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

Log in to vote
1
Answered by 10 years ago

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!

Ad

Answer this question