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

How do I make players spawn with Accesories?

Asked by 5 years ago

I tried to script it like this, but it didn't work:

local Player = game.Players.LocalPlayer local Accesory = script.Parent local Character = Player.Character

Accesory.Parent = Character

1 answer

Log in to vote
0
Answered by 5 years ago

Check when a player joined, and clone the model to their character. Do something like this:

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(char)
        local Accesory = --put the accesory here, I recommend having it on ServerStorage and                 
                                            cloning it from there
        Accesory.Parent = char
    end)
end)

This functions check when a player joined, and after when a character spawned (Works for respawn) And it clones the accesory into the character.

This haves to be a Server Script inside of ServerScriptService ; And put the accesory inside of server storage. In the local variable, do this: local Accesory = game:GetService("ServerStorage").AccesoryName

Hope I helped. If it works accept my answer please ;)

0
Thank you so much! It worked. Darius_Daiu 0 — 5y
0
then can you accept my answer please? EternalScythe 222 — 5y
0
How do I accept? I'm new. Darius_Daiu 0 — 5y
0
There should be a button around my answer. Try to search it because accepting my asnwer really helps me. EternalScythe 222 — 5y
View all comments (3 more)
0
Oh, I accepted it. Darius_Daiu 0 — 5y
0
Thank you! EternalScythe 222 — 5y
0
You're welcome! Darius_Daiu 0 — 5y
Ad

Answer this question