i'm trying to make a game that has races similar to rogue lineage but one of the races has a green variant and when a player joins this game and gets this race/variant the body colours look perfectly fine but after they die once the shade of green changes does anybody know how to fix this
1 | elseif player:WaitForChild( "RaceVariant" ).Value = = "Green" then |
2 | character:WaitForChild( "Body Colors" ).HeadColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
3 | character [ "Body Colors" ] .LeftArmColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
4 | character [ "Body Colors" ] .LeftLegColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
5 | character [ "Body Colors" ] .RightArmColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
6 | character [ "Body Colors" ] .RightLegColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
7 | character [ "Body Colors" ] .TorsoColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
Use LocalScript and put into StarterPlayerScripts
01 | while wait() do |
02 | local player = game.Players.LocalPlayer |
03 | local character = workspace:WaitForChild(player.Name) |
04 | local bodycolors = character [ "Body Colors" ] |
05 | if character:FindFirstChild( "Humanoid" ) then |
06 | bodycolors.HeadColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
07 | bodycolors.LeftArmColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
08 | bodycolors.LeftLegColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
09 | bodycolors.RightArmColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
10 | bodycolors.RightLegColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
11 | bodycolors.TorsoColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
12 | end |
13 | end |
In order to get it to load on the server (For Others to See) you must use a ServerScript place this code in a normal Script inside StarterCharacterScripts
01 | local c = script.Parent |
02 | local bodycolors = c:WaitForChild( "Body Colors" ) |
03 | if c:FindFirstChild( "Humanoid" ) then |
04 | bodycolors.HeadColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
05 | bodycolors.LeftArmColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
06 | bodycolors.LeftLegColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
07 | bodycolors.RightArmColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
08 | bodycolors.RightLegColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
09 | bodycolors.TorsoColor 3 = Color 3. fromRGB( 137 , 255 , 124 ) |
10 | end |