Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

AutoLoading character doesn't spawn at replaced spawnlocations?

So when I start the round off with spawns already placed in with studio, the character spawns at it. However, when the map and spawns are changed when the round ends, the character spawns at the default middle instead of at the spawnlocations... What is wrong? They are enabled...

local respawnDelay = 5
 
game.Players.CharacterAutoLoads = false
 
game.Players.PlayerAdded:connect(function(player)
	player.CharacterAdded:connect(function(character)
		-- find the humanoid, and detect when it dies
		local humanoid = character:FindFirstChild("Humanoid")
		if humanoid then
			humanoid.Died:connect(function()
				wait(respawnDelay)
				player:LoadCharacter()
			end)
		end
	end)
	player:LoadCharacter() -- load the character for the first time
end)

1 comment

0

The script looks fine. Do you disable the "default middle" spawn locations?

1 answer

When your character responds, use :MoveTo to change it's position.

This discussion is preserved as it was. New answers, comments, and votes are closed.