Im trying to make every player teleport to a different brick and not on the same brick please help.
heres the script (well part of it)
for _,player in pairs(game:GetService(“Players”):GetPlayers())do
if player and player.Character then
local selectedLocation = Map1.SpawnLocations:GetChildren()[math.random(1,#Map1.SpawnLocations:GetChildren())]
player.Character:MoveTo(selectedLocation.Position)
local boundsx = 500
local boundsz = 500
for _, v in pairs(game.Players:GetPlayers()) do
v.Character.HumanoidRootPart.Position = Vector3.new(math.random(-boundsx, boundsx), 7, math.random(-boundsz, boundsz))
end
This though, is assuming you have a flat surface to teleport on. If you don’t, you just use spawn points.