I do not spawn in the spawn location

Hey, so what I am trying to do is so that, the player spawns in a spawn location according to the team they are in.

So, here is what it looks like

Spawn 1

image The team properties
image The spawn properties

Spawn 2

image The team properties
image The spawn properties

What happens when I spawn

Here is where the spawns are

https://gyazo.com/7b464db6a5399b07ea92c7294ee2c9d9 This is what happens when I spawn in, it doesnt even spawn at the spawns

And no, there arent any spawns here https://gyazo.com/1400840eee6463718b9056ffe2b0ffd5

If anyone could help, that would be very appreciated <3

Edit: https://gyazo.com/97b4a89294cf9dfd398c29a00a5520db
https://gyazo.com/0324ae095c769018ea9816ab27bb1b6a

Edit 2: If you need the script here it is.

Team Script
local Player = game:GetService("Players")

Player.PlayerAdded:Connect(function(plr)
	if plr:IsInGroup(5795434) then
		plr.Team =  game.Teams.Freikorps
		print("Player is in group")
	else
		plr.Team = game.Teams.Civilian
		print("Player isnt in group")

	end
end)

If you want to do it manually, then:

local spawn1 = workspace.YellowSpawn --Or whatever it is called.
game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:Connect(function(chr)
        chr:WaitForChild("HumanoidRootPart").CFrame = spawn1.CFrame
    end)
end)

addition to @deprecatedHeart’s post, make it so that it checks in which Team you are in so it teleports you to the right position.

EDIT 1
Slightly edited @deprecatedHeart’s code.

local spawn1 = workspace.SpawnNameThere
local spawn2 = workspace.SpawnNameThere
local team1 = game.Teams.TEAM1
local team2 = game.Teams.TEAM2
game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:Connect(function(chr)
		if plr.Team == team1 then
			chr:WaitForChild("HumanoidRootPart").CFrame = spawn1.CFrame + Vector3.new(0,4,0)
		elseif plr.Team == team2 then
			chr:WaitForChild("HumanoidRootPart").CFrame = spawn2.CFrame + Vector3.new(0,4,0)
		end
    end)
end)

Does this issue occur in a live game?

Also, if you reset yourself once in, do you still continue to spawn at the incorrect location?

Additionally, are those two spawns the only spawns?

Edit:
Just saw your edits:

  • I have reason to believe that you not spawning in correctly initially is caused by the way Studio handles Play Solo.
  • Therefore, this issue shouldn’t occur in live games.

cc @deprecatedHeart

Assuming this is a Team game where multiple people will spawn, spawning like that is messy because it doesn’t automatically stack players on top of one another.

For that reason, I don’t think your solution is best for this.