When press play to test my script I get an error on line 6. Not sure what's wrong :/
torso = game.StarterPlayer.StarterCharacter.Torso
playercolor = math.random(1,5)
if playercolor == 1 then
torso.BrickColor = Color3.fromRGB(242, 243, 243)
end
elseif playercolor == 2 then
torso.BrickColor = Color3.fromRGB(196, 40, 28)
end
elseif playercolor == 3 then
torso.BrickColor = Color3.fromRGB(40, 127, 71)
end
elseif playercolor == 4 then
torso.BrickColor = Color3.fromRGB(27, 42, 53)
end
else
torso.BrickColor = Color3.fromRGB(99, 95, 98)
end

4 comments
Dang forgot about that. Thanks!
Is it possible to make the game go back and choose another color when the player resets or dies?
Updated the answer
Thanks