I have a problem, I am making a script which teleports a random player to a place, but the first time to random player gets selected, it never changes again, so its always the same person that gets teleported.
wait(15)
local Players = game.Players:GetPlayers()
local ob1 = workspace.Scorer.Orange_25.Touch
local ob2 = workspace.Scorer.Red_10.Touch
local ob3 = workspace.Scorer.Yellow_50.Touch
while true do
local Randomplayer = Players[math.random(1, #Players)]
print(Randomplayer)
Randomplayer.Character.HumanoidRootPart.CFrame = CFrame.new(73, 98, 33)
wait(14.9)
if ob1.Value == false and ob2.Value == false and ob3.Value == false then
Randomplayer.Character.HumanoidRootPart.CFrame = CFrame.new(66, 10, -287)
end
wait(0.1)
end
Help would be really appreciated, thank you. (Yes I did play the game with friends too.)

1 comment
put local Players = game.Players:GetPlayers() between lines 7 and 8 so that the variable gets updated