Hi, I have a script that teleports each player to a random location. For some reason, they are all spawning at the same location. Here is my script:
if plr.Character ~= nil then
local num = math.random(math.floor(1,13))
local pos = nil
if num == 1 then
pos = Vector3.new(35,5,35)
end
if num == 2 then
pos = Vector3.new(35,5,-35)
end
if num == 3 then
pos = Vector3.new(-35,5,35)
end
if num == 4 then
pos = Vector3.new(-35,5,-35)
end
if num == 5 then
pos = Vector3.new(65,5,65)
end
if num == 6 then
pos = Vector3.new(65,5,-65)
end
if num == 7 then
pos = Vector3.new(-65,5,65)
end
if num == 8 then
pos = Vector3.new(-65,5,-65)
end
if num == 9 then
pos = Vector3.new(-95,5,-95)
end
if num == 10 then
pos = Vector3.new(-95,5,95)
end
if num == 11 then
pos = Vector3.new(95,5,-95)
end
if num == 12 then
pos = Vector3.new(95,5,95)
end
if num == 13 then
pos = Vector3.new(0,5,0)
end
plr.Character.HumanoidRootPart.Position = pos
end
end