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.
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.
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)
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)
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)