Reset Button not Disabling

Hi. I’m trying to disable the reset button for my game, but for some reason, the code just doesn’t work.

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

Every time it runs:


I genuinely don’t know how to fix this.

If you need any more information just tell me.

1 Like

Code works when i tested it.
Just to check - what sort of script are you running it in? It may seem obvious, but I have seen people use the wrong script type accidently

Local inside StarterGui

Hm.
If you add a wait(1) at the start, does it affect anything?

Have you got any other scripts that are doing :SetCore or similar?

IT WORKS BRO

I didn’t realize u said at the start so it didn’t work at first

If you remove the wait(1) and instead move the task.wait(0.1) to before the pcall, does it still work?

(Adding wait(1) is a very unsatisfying solution)

2 Likes

lemme try

Yep

I have no idea why it needs that extra time on your end but not mine, and why the pcall isn’t doing pcall things, but I guess if you’re happy with a task.wait(0.1) being before it then all is well

I’m going to be honest I didn’t even need it to disable at the beginning of the game. I just made this post because it wasn’t working the first time. I was just testing. Also because I want to disable it at certain times.

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