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

why do i get "Script that implemented this callback has been destroyed" error when i respawned?

Asked by 3 years ago

So basically, I'm making an admin GUI with commands like respawn, kill, kick, etc but whenever I use the respawn command and try to execute another or the same command I keep getting the error Script that implemented this callback has been destroyed while calling async callback and I don't know what to do. I've tried so many things and can't find one that works, here's the part of my script that gives me the error:

cmdBar.FocusLost:connect(function(enterPressed)
    game:GetService("RunService").RenderStepped:wait()
    var = true
    if enterPressed and var == true then
        request:InvokeServer(cmdBar.Text) -- This line keeps breaking
        var = false
    end
end)

Both the script and the RemoteFunction are in the GUI. Someone, please help me as I literally do not know what to do at this point. Thanks much appreciated.

1 answer

Log in to vote
0
Answered by 3 years ago

nvm i found out the issue, it seems to be a issue with studio bc i tested it out on the normal game and it seemed to work perfectly.

Ad

Answer this question