"ResetButtonCallback" firing late

I have a LocalScript in StarterGui with the sole purpose of disabling the ResetButton. The problem is, the reset button only disables after a bit when I reset my character/play the game for a while. Is there anyway I can fix this?

This only happens sometimes.

pcall(function()
	local starterGui = game:GetService("StarterGui")
	starterGui:SetCore("ResetButtonCallback",false)
end)

"SetCore: ResetButtonCAllback has not been registered by the CoreScripts"

Example of issue:
https://streamable.com/mw2gmg

What does pcall have to do with ResetButtonCallback firing late?

Pcall has nothing to do with the issue. Same behaviour after it was removed.
In fact, if anything, it makes it more common without the pcall.

local starterGui = game:GetService("StarterGui")
local success = false
local err = nil
repeat
	wait()
	success, err = pcall(function()
		starterGui:SetCore("ResetButtonCallback", false)
	end)
until
	success
1 Like

Thanks, it works. Final code:

local starterGui = game:GetService("StarterGui")
repeat
	wait()
	local succ,err = pcall(function()
		starterGui:SetCore("ResetButtonCallback",false)
	end)
until succ

If you care about the proper way of using pcalls:

local StarterGui = game:GetService("StarterGui")

while (true) do
    local success, _ = pcall(StarterGui.SetCore, StarterGui , "ResetButtonCallBack", false)
    if (success) then break end 
end
1 Like