I asked this before and i thought i got it to work but it says it again...
i am trying to teleport 2 random people to a certain spot in the map (665.995,7.1,-115.005)
when i hit play it says
Workspace.Script:7: bad argument #1 to 'random' (interval is empty)
when i join the game with me and my friend in the same server it says
Workplace.Script:7: bad argument #1 to 'random' (interval is empty)
local allPlayers = {}
for a,v in pairs(game.Players:GetPlayers(2)) do
table.insert(allPlayers,v)
end
local plrAmount = game.Players.NumPlayers
math.randomseed(tick())
local val1 = math.random(plrAmount)
local val2
repeat wait(5)
val2 = math.random(plrAmount)
until val2 ~=val1
allPlayers[val1].Character.Torso.CFrame = CFrame.new(0,0,0)
allplayers[val2].Character.Torso.CFrame = CFrame.new(665.995,7.1,-115.005)

1 comment
As an additional note, "bad argument #1 to 'random' (interval is empty)" means that your expression is invalid for math.random. Most likely plrAmount is initially 0 (as expected), which is causing the issue.