Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Randomly Selecting a player as a Seeker?

Im making a game called Squeak! and i want to know how to make a generator that randomly selects a player to be the Human/Seeker?

2 answers

I'm not sure if that can be consolidated at all, but it should work to the best of my knowledge. Feel free to comment with questions.

local players = game.Players:GetPlayers()
local num= math.random(#players )
local seeker = players[num]

my cousin got this bit of it:

function. selectSeeker()
	return game.Players:getChildren()[math.random(1,game.Players.NumPlayers)]
end
selectSeeker()

This discussion is preserved as it was. New answers, comments, and votes are closed.