Hi, So I need a script for my game where at the beginning of each round it picks a random player to be a killer, and I don't know how to do this, can you guys pls kind of give an example or what to type on the wiki, Thanks! :D
✓ ANSWER ACCEPTED
How do I make select a player script?
1 answer
✓ Accepted answer
You need to use math.random to pick a random player.
p = game:GetService("Players"):GetChildren()
randplayer = p[math.random(1,#p)]
print(randplayer.Name)
Please accept if this helped!
This discussion is preserved as it was. New answers, comments, and votes are closed.

4 comments
will it save that rand player.
This just an example. Read the wiki to find out how to do that.
GetPlayers() not GetChildren
Works too, why would you put anything else in the Players service?