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

How can I make a player spawn with a certain hat? [closed]

Asked by 10 years ago

This question already has an answer here:

Giving a user a hat that the user doesn't own? [Solved!]

How can make a player spawn with certain hat?

Marked as Duplicate by Sublimus and evaera

This question has been asked before, and already has an answer. If those answers do not fully address your question, then please ask a new question here.

Why was this question closed?

2 answers

Log in to vote
0
Answered by
Vathriel 510 Moderation Voter
10 years ago

Alright, so I'm going to begin by assuming you know the basics of scripting, now roblox doesn't actually let you put a hat in a player and have it magically go on, so say if the player had no hats, then it would auto apply itself to your head, however if they have 1 hat or more, than you start to encounter issues with the hat not wanting to join. So lets assume the player has no hats on:

Hat = game.Lighting.Hat -- Wherever your hat is stored.

game.Player.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)
        Hat:Clone().Parent = character
    end)
end)

If you need more help be free to message me!

Ad
Log in to vote
0