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

Turn 'Reset Button' error: SetCore: ResetButtonCallback has not been registered by the CoreScripts?

Asked by 5 years ago
Edited 5 years ago
wait()
local walk = script.Parent.Head:WaitForChild("Running")
walk.Volume = 0

local human = script.Parent.Humanoid
human.WalkSpeed = 22
wait()
game.StarterGui:SetCoreGuiEnabled(Enum.CoreGuiType.All, false)
game.StarterGui:SetCore("ResetButtonCallback", false)

all of this code works until the last line which is giving me the error: SetCore: ResetButtonCallback has not been registered by the CoreScripts. anyone got a fix?

0
the core gui has to have loaded at least(the character spawned) once before ResetButtonCallBack so putting it in a startergui localscript is the best option. LostPast 253 — 5y

1 answer

Log in to vote
1
Answered by 5 years ago

That just means the CoreGui hasn't loaded yet.

You can use the following code to ensure the reset button is disabled:

LocalScript:

repeat
    local success, failure = pcall(function()
        game.StarterGui:SetCore("ResetButtonCallback", false)
    end)
    wait()
until success

This loop waits until ResetButtonCallback successfully loads and is disabled then breaks.

0
Thank you! IwanCodes 8 — 5y
Ad

Answer this question