I am trying to make the game choose a random color for the player's torso each time they spawn but it only seems to work off and on. What am I doing wrong here?
torso = game.StarterPlayer.StarterCharacter.Torso
playercolor = math.random(1,5)
if playercolor == 1 then
torso.BrickColor = BrickColor.new(242, 243, 243)
end
elseif playercolor == 2 then
torso.BrickColor = BrickColor.new(196, 40, 28)
end
elseif playercolor == 3 then
torso.BrickColor = BrickColor.new(40, 127, 71)
end
elseif playercolor == 4 then
torso.BrickColor = BrickColor.new(27, 42, 53)
end
else
torso.BrickColor = BrickColor.new(99, 95, 98)
end

1 comment
Looks pretty clean to me. @HondaHazard271 try this.