How to spawn in different places

fom the title you probaly don’t get it well i’m making a game but i want it so if your a a certain place you respawn at a different spawn.

i bet you don’t understand dont matter lol

i make alot of pots because i’m not the best at Roblox Stuido :grinning:

1 Like
  1. Either give every player a spawnpoint which they will spawn always at that location (put every spawnpoint inside 1 folder/model).
-- Services
local Players = game:GetService("Players")

-- Put the spawnpoints in a table
local spawnpoints = {}

for _,spawnpoint in pairs(workspace.Spawnpoints:GetChildren()) do
    if spawnpoint:IsA("SpawnLocation") then
        table.insert(spawnpoint,spawnpoints)
    end
end

-- Option 1: Set manually (for minigames, etc)
for _,player in pairs(Players:GetPlayers()) do
    player.RespawnLocation = spawnpoints[1,#spawnpoints]
end

-- Option 2: When a player joins (for RPGs, etc)
Players.PlayerAdded:Connect(function(player)
    player.RespawnLocation = spawnpoints[1,#spawnpoints]
end
  1. Create a lot of spawnpoints so players spawn randomly at the spawnpoints.
1 Like

I’d do that with a DataStore if it should spawn you further progress-wise.

What happens is when you play the game its a camera gui then i gets destroyed but when you die you spawn at it. You start at it bc i want music in different places.

You can just put spawns anywhere you want!

When player joins they will auto spawn to random spawn.

RandomSpawn.rbxl (23.4 KB)

what is that dowload???

I will have a go thanks. :grin:

That’s a model download; drag it inside a place to look at it.
.rbxl is model downloads and .rbxlx is a place download. (if im right)

Its a place as example.

Place: RandomSpawn.rbxl (22.9 KB)

Virus total: VirusTotal

second one works buttt at some point you go to the menu

Can you explain what the issue is?
And which one;

1.1. When a player joins give them a spawnpoint
1.2. Manually set the spawnpoints
2. A lot of spawnpoints

its a camera gui for a menu you spawn next to it to so you can get different music. the play button will take you to the lobby but if you die you spawn next to the menu. hope you get it