Error when trying to disable the reset button

Hello Everyone!

today I was trying to disable the reset button for one of my games but no matter what I try it just gives me the error

  23:46:31.419  SetCore: ResetButtonCallback has not been registered by the CoreScripts  -  Client - PlayerSettings:5

can anyone help me fix this?

-- local script inside startergui
local Gui = game:GetService("StarterGui")
local player = game:GetService("Players").LocalPlayer

player.CameraMaxZoomDistance = 30
Gui:SetCore("ResetButtonCallback" ,false)
local function func()
	local success,message = pcall(function()
		Gui:SetCore("ResetButtonCallback" ,false)
	end
	
	if not success then
		task.wait(.2)
		func()
	end
end

func()
1 Like

Thats because u did it too early, wait for 2 seconds or put it at the end of a script

pcall it. Usually what I’d do is wait a moment before doing it though. If it still errors, wait a moment again and try it.

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