Help with fixing spawn points in my game

Hello fellow developers ! So , I don’t know why but the spawn points in my game are actually not working how they should. I want that when the player dies , they spawn back into the lobby and not in the map in which they just died but due to some reason they spawn in the same map again. I am not able to solve the issue since 3 days. Here is my spawning code.

-- Teleport players to the map
	
	wait(5)
	
	local SpawnPoints = ClonedMap:FindFirstChild("SpawnPoints")
	
	if not SpawnPoints then
		print("Spawnpoints not found!")
	end
	
	local AvailableSpawnPoints = SpawnPoints:GetChildren()
	
	for i, player in pairs(plrs) do
		if player then
			character = player.Character
			
			if character then
				-- Teleport them
				character:FindFirstChild("HumanoidRootPart").CFrame = AvailableSpawnPoints[1].CFrame + Vector3.new(0,10,0)
				table.remove(AvailableSpawnPoints,1)

Any help will be really appreciated. If it is required then I am using R15 avatar type.

2 Likes

I’m not really sure about this but, go check the spawnlocation if its neutral true or false cause maybe the thing happen there if you already check the neutral is false then still not working, then I have no idea Im just tryna help :sweat_smile:

1 Like

You can use CFrame to move them to the map when a round starts and keep their spawns at the lobby.

1 Like

Update : I went with @BlackShin00 's way first and just disabled the neutral property from my spawn points and it worked ! Thank you very much and anyone who sees this topic with the intent to solve the same issue I encountered , just disable the neutral property :joy:

1 Like