Player:LoadCharacter() issue


I am making a game module, and when I team the player to be on the lobby team when they are out, it works. But, when I call Player:LoadCharacter(), it doesn’t teleport the player back to their spawn point.

I tried printing the players team, and it says Lobby.
I tried using Player.Character.Humanoid.Health = 0 but it doesn’t work either.
I tried setting the Player’s primary part to a random spawn but it doesn’t work either
I tried disabling my anti-exploit but it still doesn’t work


ReplicatedStorage:WaitForChild("Values"):WaitForChild("Teams"):FindFirstChild(Team1).Value = true
		for _, Player in pairs(Players:GetPlayers()) do
			if Player and Player.Team == Team then
			Player.Team = Teams:FindFirstChild("Lobby")
			local vector = Panna.randomSpawn()

Any help would be appriciated, thanks!

Make sure the SpawnLocation.TeamColor ( is set to the same color as the team the player is!

alternatively, you could set SpawnLocation.Neutral ( to true if u want any player on any team to spawn there

It already is.

I have 4 teams, and when I start the round, will it teleport one of the players to a neutral spawn or their team spawn?

pretty sure it’ll pick a spawn at random of any spawns that the user is able to spawn at

Setting the SpawnLocation to neutral doesn’t work.