When you script to pick a random thing or in my case a person, how would you do it so that it only picks 1 person and not 5 people? Here is my example.
function findperson() player = game.Players:GetPlayers() person = player[math.random(1, #player)] end
Does the # 1 mean that it picks 1 person? Cause for some reason, it picks random numbers of people like 2 or 3 or 1 or 4?
Uhm, it already does pick one person. I believe you were using 'player' variable. Also you should use return instead of using global variables.
function findperson() local players = game.Players:GetPlayers() local person = players[math.random(#players)] return person end randomPerson = findperson()