Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make This Script That Selects A Player?

Asked by
WishXVI 94
4 years ago

Alright, so here is a thing I'm trying to do, I have been trying to make a hide and seek game but heres my question, how can I make a script that selects a player and makes them it.

2 answers

Log in to vote
1
Answered by 4 years ago

You would first have to get all the players in the game, and select one of them at random:

local players = game.Players:GetPlayers()
local chosenplayer = players[math.random(1, #players)]
Ad
Log in to vote
0
Answered by
WishXVI 94
4 years ago

Wait NVM I got it. :)

Answer this question