How to make everyone teleport to a different spot on the map roblox (please help)

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)

Would you mind sharing the whole script so we can get a better idea on how to help you solve this?

Thanks, Opex.

i uploaded a more detailed post here: I am trying to to make it where it teleports all the players to different spawnpoints and not pick the same spawnpoint twice

This is simple.

Given a bounds to teleport in, we could say this:

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.

I dont think you understand what i meant you can see my new detalied post about this: