TeleportService TeleportIn/Out Events

I feel like all I ever talk about these days is TeleportService…

What I’m proposing is two events to be added to the current TeleportService. (Names probably don’t follow naming conventions)

[tt]TeleportIn(Instance Player, int OriginalPlaceId, string SpawnName)[/tt]

We would be able to use this event to determine where the Player originally teleported from (and to which spawn they’re heading to if [tt]TeleportToSpawnByName[/tt] was called.
This would be useful for cases like these. (Using LoadCharacter totally negates TeleportToSpawnByName.)

This would also be useful for “lobby” places if you wanted to announce where players and flowing in from. (good for analytics too)

[tt]TeleportOut(Instance Player, int DestinationPlaceId, string SpawnName)[/tt]

TeleportOut would work very similarly, but of course would only fire if a player was teleporting out of the server. This could be used to announce or save where players commonly teleport.


Now announcing or saving these sorts of things are currently possible with foresight. But if you wanted to create a FreeModel for something like this, you’d have to instruct the user to install bits of your code into their current teleportation scripts and that just gets messy. With these, you’d be able to just listen for the events and “module-ize” your model. (so its just a plugnplay)

Just a note: if it was possible to programmatically fetch the player’s target spawn, then people would use that string as a means of passing information between places not in the same universe.

What is your use case for these events?

[quote] Just a note: if it was possible to programmatically fetch the player’s target spawn, then people would use that string as a means of passing information between places not in the same universe.

What is your use case for these events? [/quote]

My main case is that my current Universe uses LoadCharacter to handle all of the spawning of the characters. Because the game no longer respawns the character on its own, it totally ignores the SpawnName that I pass along.

If I can see all the people coming in from the event, I can handle the respawning on my own without quickly saving the string to the datastore (which I could do as well)