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 specific body colors/clothing?

Asked by
XMGQ 0
6 years ago
function onPlayerEntered(newPlayer)

    newPlayer.PantsTemplate = 0
    newPlayer.ShirtTemplate = 592756318
    newPlayer.Head.BrickColor = "Institutional white"
    newPlayer.LeftArm.BrickColor = "Institutional white"
    newPlayer.RightArm.BrickColor = "Institutional white"
    newPlayer.LeftLeg.BrickColor = "Really black"
    newPlayer.RightLeg.BrickColor = "Really black"
end

Okay, so what I tried to do was make it so when people spawn they look like guests. They would wear no pants and there legs would be black instead. Their heads and arms would be white like a guest too.

What did I do wrong?

0
u should do game.Players.PlayerAdded:connect(function(plr) , next line , plr.CharacterAdded:connect(function(char) 36HamumuGT63 0 — 6y

1 answer

Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

This so called function is incorrect you do not put what happens with the function after you write it what goes after is the variable in your case thats the "NewPlayer" Variable

Instead your say what the function does before it in your case you would have to do this instead

game.Players.PlayerAdded:connect(function(newplayer)

-- Put the recolouring thingy here

end)

And with the changing costume thingyymajiggg your calling the function which will detect inside of the PLAYERS section in the studio what you want it to do is to find the player inside of the workshop Not the player section.. so instead you want to create a new variable and change all of the "NewPlayer" Variables in your changing costume part in the centre to this new variable

game.Players.PlayerAdded:connect(function(newplayer)
       local NEWVARIBLE = workspace:WaitForChild(newplayer.Name)

--Rest of costume changing here


end)

Also the texuture ids I'm pretty sure are on the torso pieces but I'm not 100%

Ad

Answer this question