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

How do you change a players skin color?

Asked by 5 years ago

I created a script and put it in the server script service to change a players skin color when they join the game. There are no errors but it doesn't do anything.

01game.Players.PlayerAdded:Connect(function(player)
02    player.CharacterAdded:Connect(function(character)
03        if character.Humanoid.RigType == Enum.HumanoidRigType.R15 then
04            character.Head.BrickColor = BrickColor.new("Royal purple")`
05            character.UpperTorso.BrickColor = BrickColor.new("Royal purple")
06            character.LowerTorso.BrickColor = BrickColor.new("Royal purple")
07            character.LeftUpperArm.BrickColor = BrickColor.new("Royal purple")
08            character.LeftLowerArm.BrickColor = BrickColor.new("Royal purple")
09            character.RightUpperArm.BrickColor = BrickColor.new("Royal purple")
10            character.RightLowerArm.BrickColor = BrickColor.new("Royal purple")
11            character.LeftUpperLeg.BrickColor = BrickColor.new("Royal purple")
12            character.LeftLowerLeg.BrickColor = BrickColor.new("Royal purple")
13            character.RightUpperLeg.BrickColor = BrickColor.new("Royal purple")
14            character.RightLowerLeg.BrickColor = BrickColor.new("Royal purple")
15                character.LeftHand.BrickColor = BrickColor.new("Royal purple")
View all 29 lines...

1 answer

Log in to vote
0
Answered by
Lucke0051 165
5 years ago
Edited 5 years ago

In the players character there is a BodyColor Instance. You can simply change the properties of it to change the characters BodyColor. If the BodyColor instance is not there, you can insert it with Instance.new() Read more here: https://developer.roblox.com/en-us/api-reference/class/BodyColors

0
Thanks! I tried it and it worked. robertandre 35 — 5y
Ad

Answer this question