A method of TeleportService is already available to teleport a user to a place with the given placeId, and includes the ability to specify the name of a spawn that a player should spawn at. This got me thinking about three methods that I think would be really useful:
Player:TeleportToSpawn()
This method would trigger the exact same spawning functionality that would occur if the player died; without the player dying or being reloaded.
Player:TeleportToSpawnByInstance(SpawnLocation spawnLocation)
This method would cause the player to be teleported to the specified spawn location by instance, with the typical spawning functionality.
Player:TeleportToSpawnByName(string spawnName)
This method would cause the player to be teleported to the specified spawn location by name, with the typical spawning functionality.
These methods could be a member of a different class and be named differently, but the purpose of those methods is to outline what the functionality should be. The reason I think this would be useful is it would allow us to have fuller control over SpawnLocations.
I think you’re misinterpreting the first part. The cross-place methods were what inspired me to suggest these. The methods I suggested do not work cross-places; rather, they are for use in the current place.
Precisely; with the same functionality as a player that just respawned. It’s essentially forcing the spawn method on a specific SpawnLocation without the player dying.
Precisely; with the same functionality as a player that just respawned. It’s essentially forcing the spawn method on a specific SpawnLocation without the player dying.[/quote][tt]player.Character.HumanoidRootPart.CFrame = spawnPoint.CFrame + Vector3.new(0, 3.5, 0)[/tt]
Precisely; with the same functionality as a player that just respawned. It’s essentially forcing the spawn method on a specific SpawnLocation without the player dying.[/quote][tt]player.Character.HumanoidRootPart.CFrame = spawnPoint.CFrame + Vector3.new(0, 3.5, 0)[/tt][/quote]
I already do something very similar to this; however, this would not function as a SpawnLocation would.
[quote] [quote]
Player:TeleportToSpawn()
This method would trigger the exact same spawning functionality that would occur if the player died; without dying.
[/quote]
So Player:LoadCharacter()?
So Player.Character:MoveTo(spawnLocation.Position)?[/quote]
Regarding Player:TeleportToSpawn():
No, I don’t want the player to be loaded again. I simply want them to be teleported to the spawn point, as if they were respawning.
Regarding Player:TeleportToSpawnByInstance(SpawnLocation spawnLocation):
No, I want it to have the same functionality as spawning in. As far as I’m aware, teleporting them to the location of the SpawnLocation would not cause players to stack on top of each other. (Or perhaps that’s actually how :MoveTo() works, I’m not quite sure.)
I suppose that even with the extended explanation I provided, it was insufficient to properly explain what I’d like to be implemented.
Spawn locations are an easy way to manage where players appear in the world. They aren’t intended to cover every possible case. It sounds like you would benefit from making a custom spawning system. That way you can tweak it to behave however you want.