Hello Scripting Helpers! I am working on a game and in one part the game chooses one player randomly and changes his team, this is the script:
function playeer()
math.random(tick())
plr = game.Players:GetPlayers()
print (math.random(#plr))
plr.TeamColor = "Really Red"
wait(1)
end
wait(23)
playeer()
The output only prints one number, this could be depending on the number of players, for example if theres 5 players it only prints one number which is positive and below 5, and so on like if theres 3 players, it prints a positive number below 3 or it could be 3, but thats the highest it could print due to the number of players. Also it doesn't changes the teamcolor.

3 comments
I tested it and the output says "16:53:19.834 - Workspace.Script:3: function arguments expected near 'print'"
never mind found the error, there are missing parenthesis.
Oh yeah sorry about that.