Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

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.

This discussion is preserved as it was. New answers, comments, and votes are closed.