Illegal Teleport Destination For Some Users

In my game Mount of The Gods players are sometimes unable to teleport to the Lobby place. The ID and function that teleports them to said place is the same every time, and there is no reason that something like this would be happening.

My code to teleport everyone is just a simple remoteEvent call.

TUTORIAL = 478459751
LOBBY = 481987774

HUD.MainMenu.Lobby.MouseButton1Down:connect(function()
	game.ReplicatedStorage.Resources.Remotes.Teleport:FireServer(LOBBY)
end)

HUD.MainMenu.Tutorial.MouseButton1Down:connect(function()
	game.ReplicatedStorage.Resources.Remotes.Teleport:FireServer(TUTORIAL)
end)

Where the server hook is as follows:

game.ReplicatedStorage.Resources.Remotes.Teleport.OnServerEvent:connect(function(player,id)
	TeleportService:Teleport(id,player)
end)

The values for these constants never change, there is no situation in which either of the IDs will not work, yet still I get tons of reports of illegal teleport destinations. My only explanation is that teleportservice is possibly trying to teleport the player to a server that is running on a different platform, given that my game has a pretty equal following of both PC and XBOX players. I have no way to test this.

Here is a link to the place https://www.roblox.com/games/460710135/Mount-of-the-Gods, the code can be found in MainMenu(Playerscripts) and PlayerManager(ServerScriptService)

4 Likes

Why are you using a RemoteEvent?
I thought teleporting works clientside.
(server just tells the client to teleport)

Yeah, this is unnecessary. Internally the server will just fire another remote to tell the client to teleport.

It works clientside but I always assume services are more reliable on the
server

For HTTP stuff, yes, but teleporting is completely clientside.
The only thing the server does is generating a reserveCode if you use reserved servers.
(so if an exploiter knows that, he/she can just teleport himself/herself to reserved servers without a problem)

I can switch it over to clientside, is that the cause of the problem though?

No, that wouldn’t cause this problem. I can look into the root cause of this bug, I’m not sure if it is a client bug or a web bug right now. For now I would advise that you just retry when the teleports fail.

1 Like

Well the problem is that it takes them to the teleport screen and then
tells them the destination is illegal, so I can’t retry as far as I know.