Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Pcall not working with my script because the Script crashes on error?

Asked by 6 years ago
local function InsideOfAFunction (MainPlayerId)
     Success, Error, placeId, instanceId = TeleportService:GetPlayerPlaceInstanceAsync(MainPlayerId) 
end

local MainPlayerId = player.UserId
local SUCCEEEEED = false
local Messagfg = nil
repeat 
    print("Starting to teleport player 1")

    SUCCEEEEED, Messagfg = pcall(InsideOfAFunction(MainPlayerId))

    print("Attempted to teleport player one")
    print(Messagfg)
    print("Succeed = ".. SUCCEEEEED)

until SUCCEEEEED == true    

print("Player teleported fine lol")

This Pcall doesnt work. the error is as followed: error: HTTP 0 (HTTP 400 (HTTP/1.1 400 UserOffline))

Basically the Pcall runs this function and this error is outputed. but i thought that pcall prevents the error from making a difference, but the script crashed when the error is outputed. please help ~AnonymousDeveloper

0
Bump AnAnonymousDeveloper 77 — 6y

Answer this question