Is it possible to have a separate spawn locations for each player?

Hello. This is my first post, so be gentle :slight_smile:

I am working on a game that introduces a lot of new concepts, and has been a bit confusing for my friends who have tried it. Therefore I have added a tutorial. Unfortunately, for the tutorial to work properly, each player must spawn at dedicated single player area, and work their way to the main arena. I want new players to spawn at these places, with the option to skip tutorial.
I have made 16 tutorial teams, and 16 corresponding spawns. I also wrote a script that should sort players to those teams.

"Earth green",
"Slime green",
"Bright bluish green",
"Deep blue",
"Dark blue",
"Navy blue",
"Parsley green",
"Dark green",
"Smoky grey",
"Steel blue",
"Storm blue",
"Dark indigo",

local tutorialAssignment = {}

local function onPlayerAdded(player)


local leaderstats ="Folder")
leaderstats.Name = "leaderstats"
leaderstats.Parent = player
local level ="StringValue")
level.Name = "Level"
level.Value = 1
level.Parent = leaderstats

local alignment ="StringValue")
alignment.Name = "Alignment"
alignment.Value = "Neutral"
alignment.Parent = leaderstats

local wins ="StringValue")
wins.Name = "Wins"
wins.Value = 0
wins.Parent = leaderstats

local pick = math.random(16)
	local random = math.random(16)
until tutorialAssignment[pick] == nil
print(player.Name .. " is " .. pick)
tutorialAssignment[pick] = player
player.TeamColor =[pick])


for index , value in pairs(tutorialAssignment) do
	if value == player then
		tutorialAssignment[index] = nil


However it does not work in studio Sometimes 2 players get different team, but they spawn at the same place. Sometimes they just remain on neutral team, and spawn randomly, even though there are no neutral spawns. Is it something to do with the studio (If so how do I test it, without 15 volunteers?), or spawn locations are not reliable, and I should code my own spawn system?


A more reliable way to set the spawn of a player is too use Player.RespawnLocation and set it to a SpawnObject. This will guarantee that the player will spawn there, and teams dont have to be used.

As for testing with 15 players, dont. Try it with 2 spawns and see if it works. The same principles apply to 15 players.

If you have any more questions or concerns, feel free to ask them.


Like @REALTimothy0812 said, don’t. But if you need to test with a couple of players players at some point, read up on game testing. You can simulate lots of different clients to check if you systems work.

1 Like