Hey devforum! I seem to be having an issue where the success rates of my teleport script are really low, i was wondering if theres a way to fix this or if theres a more efficient way to script this?
What is the issue: when i call the teleport event on a player after the loading screen, the teleport takes 1+ minute to fully work or most of the time just throws a teleport error on screen after waiting the long 1-2 min wait:
What solutions have I tried so far: Ive tried changing teleport methods in the script, but both still gave errors.
Heres the link to the game if you want to test it out: REALMS of roblox [ALPHA] - Roblox
below is the code for my teleport handler, and yes ive already checked that the place ID is correct.
local TeleportEvent = game.ReplicatedStorage.TeleEvent
local TPS = game:GetService("TeleportService")
local ServerStorage = game:GetService("ServerStorage")
TeleportEvent.OnServerEvent:Connect(function(plr)
local Players = {}
table.insert(Players,plr)
local PrivateServerCode = TPS:ReserveServer(16740888388)
TPS:TeleportToPrivateServer(16740888388, PrivateServerCode, Players)
table.clear(Players)
end)
Possible causations of this problem:
-
I may have scripted something wrong in the script, if so then please let me know!
-
The place being teleported to is massive and may take time to prepare in the servers:
-
It may be something to do with the fact ive limited the server capacity im teleporting the player to at 1 max plr. But im not sure.
Thanks for the help - FastTheDev