Teleport to different place inside same server

  • I want to teleport player from one place to another in my experience so player will be still at same server. From what I saw for example in “Pet Simulator X” game if player moves to another place (world) he still can be seen at the same server (from game site → Servers) page. Player still takes one place on that server no matter what ‘place’/‘world’ he is in.

  • The issue is that in my game I’ve created second place via “Asset Manager → Places”. Then in my game I try to move player by using:

TeleportService:TeleportAsync(TARGET_PLACE_ID, {playerToTeleport}, teleportOptions)

function. And it works the way that player is teleported to right place. But it doesn’t seem like he is still at same server. I can see player at game server only if he is at ‘start place’ inside my game, but if he moves to second place he isn’t visible anymore at “Servers page” of the game. He isn’t counted to server limit.

  • I already tried to use different ‘destinationWorldID’ but it seems like only ID copied from place at “Asset Manager” works.
    I’ve also tried to change “teleportOptions.ServerInstanceId” this by using “game.JobId” to join same server? But it didn’t work too, I have an error “Attempted to teleport to a place that is restricted. Error Code:773”.

I’m starting to think that my approach to couple places inside single game is wrong. Because when I use ‘TARGET_PLACE_ID’ for ‘TeleportAsync’ function then I use place ID from “Asset Manager” so let’s say I have two places there with two ID’s: place1_ID and place2_ID. But when I try to look at game servers then I of course look only at page of ‘place1_ID’, not ‘place2_ID’. So I’m not sure if “Pet Simulator X” or other games are using same method.

If somebody already did more then single place inside his game and maybe can help me with proper way of doing this I would be grateful.

3 Likes

I think you should make the “world” in the same place imo.

1 Like

And how can I do this? Because if you mean by that to do just ‘another platform’ inside same place then it’s not what I try to do. I felt like my game was already kind of big, there was many things inside and from what I saw some players had some problems with render all this things etc.

I decided to create new world in my game. But if I make

“world” in the same place

Then it’s kind of like not new “world” at all. So I’m not sure if I understand you right.

This post might be helpful:

1 Like

then it’s probably not something you should do, that was just the simplest solution to the problem.

1 Like

Isn’t that because there is too many things in single place?

If I understand correctly if player is joining game with multiple places he only has to load the single place objects, scripts etc.
Of course I’m able to make all the things at same place just put them next to each other but I think at long run it might cause more and more efficiency problems due to it’s size.
At least that was my understanding about games like “Pet Simulator X” and why they do different worlds in their games. Maybe I’m wrong about it?

Yes, this is exactly what I did, I think I even looked at this post before.

But my problem is that I see two different effects of how this different places inside game work. In my game if I join my first place I can see myself at ‘Servers’ like this:

image

But then when I go other places inside my game I disappear from servers list.

And this is effect not seen in other games I played where I can change ‘places’/‘world’ like PSX. So this is where my confusion comes from and why I think I do something wrong either with place creation or just with teleportation to that place.

1 Like