Set a default player start/respawn point, not a random spawn pad?

I have multiple spawn pads in my lobby. Those pads are named “SpawnA, SpawnB, SpawnC” and I only want the player to spawn/respawn at SpawnA. The other pads are for returning from teleported places.

When you start the game (lobby) or die in the lobby, you should only spawn at SpawnA. Currently the player spawns randomly between A,B, and C.

How do I set a default?

I need this:
SpawnA starting point for entire game/respawn point for lobby deaths

SpawnB → soley used for return to lobby from place 2.

SpawnC → soley used for return to lobby from place 3.

I’m using TeleportToSpawnByName and B/C do their job. The problem is the random spawns around the lobby.

1 Like

Looks promising for respawns but what about setting a starting point for the game? That example would respawn the player to the first pad he touched initially.

You could set a player to a certain team whose spawn location is the starting one when they join, or teleport them yourself manually.

1 Like

I can’t set them as teams because this is for a mini game lobby. There are places in the game where I need the teams to work normally for shooters, etc. Your idea is brilliantly simple and works but is going to make it harder to uncouple at other points in the game.

I’m using TeleportToSpawnByName to teleport to SpawnB and SpawnC. This service requires those pads match player team color or neutral or the player won’t port in.

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAdded:Connect(function(Character) 
        local HRP = Character:WaitForChild("HumanoidRootPart")
        HRP.Position = Vector3.new(0,0,0) --Respawn position here
    end)
end)

Thanks. Does this go in StarterPlayerScripts?

Nah, its should located to ServerScriptService

1 Like

Sorry i found error in my script

can you change to this?

game.Players.PlayerAdded:Connect(function(Player)
	Player.CharacterAdded:Connect(function(Character) 
		local HRP = Character:WaitForChild("HumanoidRootPart")
		wait() -- Wait for character load
		HRP.Position = Vector3.new(0,0,0) --Respawn position here
	end)
end)
1 Like

Big thanks for the help @dollychun!

1 Like

It works on Studio if I set a wait time but in Roblox client it glitches and the character/camera gets stuck in the map. Also, in Studio for a split second the players spawns on the pad first, then shoots over to the coordinates. Any ideas? I’ve tried 0.1 to 1 wait.

Maybe you should use CharacterAppearanceLoaded instead of CharacterLoaded

game.Players.PlayerAdded:Connect(function(Player)
    Player.CharacterAppearanceLoaded:Connect(function(Character) 
        local HRP = Character:WaitForChild("HumanoidRootPart")
        HRP.Position = Vector3.new(0,0,0) --Respawn position here
    end)
end)
1 Like

Works in client with 0.2 wait but still hits a spawn first and then shoots over to set coordinates. Is there a way to further prioritize your script?

Upon further research this seems to be the way to go. It works with built in Teamcolor and a team changing spawn pad.

Thank you both for the ideas.