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

Making Sure Player has hat?


-- Hat

----------------------------------------


local NewHat = game.ReplicatedStorage.HeadBands.Headband

repeat wait()
NewHat.Parent = script.Parent
until NewHat.Parent == script.Parent

I've made this simple script, yet when I die the hat doesn't appear on the player?!? (In StarterCharacterScripts)

1 answer

You have one hat in each players ReplicatedStorage, meaning that it disappears when you put it on the player. Use :Clone() at the end of your NewHat variable to make a clone of it, meaning that it does not get rid of the original.

1 comment

0

I've fixed it, I've edited the script and moved it into startergui, cloning the hat into the player's character

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