Has not been registered by CoreScripts

a script for disabling the respawn button shows “ResetButtonCallback has not been registered by the CoreScripts”

this is the script and the location is in StarterGui

sometimes the error message appears and sometimes it doesn’t

local plr = game:WaitForChild("Players").LocalPlayer
plr.CharacterAppearanceLoaded:Wait()
local Gui = game:WaitForChild("StarterGui")
Gui:SetCore("ResetButtonCallback" ,false)

lmk if you can help, thanks

ResetButtonCallback is not initially registered once the client starts up, you should instead wrap it in a pcall and continue trying to until it references it.

what do i do with a pcall ive never used them

The pcall function is basically like a try-catch. You pass in a function and arguments, if an error is thrown, it returns false and the error, otherwise true and the results of the function if any.

You can then do this to disable the reset button:

repeat task.wait(.2) until pcall(game.StarterGui.SetCore, game.StarterGui, "ResetButtonCallback", false)

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.