How do i stop teleporting if it fails?

i’m making a script for when a script doesn’t run (pcall) and i want to stop the teleporting if teleportservice is down. code:
image

The teleporting would stop on its own if TeleportService wasn’t working. What do you mean?

I want the loading screen to become invisible. could i just put a task.wait()?

Do you mean your own loading screen or the official one?

my own loading screen. i hate using pcalls lol

The problem is you cannot do this without pcalls.

Pcalls would allow you to detect if a teleport fails, in this case if you get success = false then you can safely use the TeleportCancel() function.

However I believe there is a way of using HTTP requests with the Roblox status page.
I’m not familiar with it, and would be pretty complicated to implement.

This function is only for CoreScripts, pcalls are the only option here.

https://developer.roblox.com/en-us/api-reference/event/TeleportService/TeleportInitFailed
The ‘TeleportService’ methods don’t use error so pcall is unnecessary.

1 Like