How can i disable reset button?

Is there a way to disable the resetbutton other than resetbuttoncallback, for instance if you press reset nothing happens. The button isnt disabled but nothing will happen if you reset. Is there a way to do this?Preformatted text

7 Likes

- The Answer is: No. :frowning:


Sadly, you can not disable the ResetButton without using the ResetButtonCallBack. You can apply this callback by reading the next section.


- Applying the Callback! -

To apply the callback, do the following steps down below!

  • In the Explorer Window, create a new LocalScript parented to the StarterGui service.

  • Next up, you can rename the script to whatever you desire but, for now, I will just call It ResetButtonDisabler for testing purposes.

  • Inside the LocalScript type or paste the following:

-- Roblox Services
local StarterGUI = game:GetService("StarterGui")

-- Disables the Reset Button
StarterGUI:SetCore("ResetButtonCallBack", false)

However, if the CoreGUI for the ResetButtonCallBack has not loaded, It will throw you an error. To prevent this, insert a pcall() [Protected Call] and a repeat loop to stop this from happening. You can apply It by doing the following:

-- Roblox Services
local StarterGUI = game:GetService("StarterGui")

-- Disables the Reset Button
----[ Creates a Loop to make sure that the ResetButtonCallBack works.
repeat 
	local success = pcall(function() 
		StarterGUI:SetCore("ResetButtonCallback", false) 
	end)
	task.wait(1)
until success

I hope that helped mate! Peace out! :slight_smile:

36 Likes

Adding to what mxlky_moon said, you can use StarterGui:SetCore("ResetButtonCallback", false)

However if the coregui for “ResetButtonCallback” has not loaded it will throw an error. To combat this, add a pcall (protected call) and a simple loop to stop it. Like such:

repeat 
	local success = pcall(function() 
		starterGui:SetCore("ResetButtonCallback", false) 
	end)
	
	task.wait(1)
until success

This is just an example, edit it to your hearts content.

Note: If your problem has been solved, please mark mxlky_moon’s post as a solution.

10 Likes

If none of these help you…:

That solution has 3 other solutions attached to it.

…Then depending on what you need this for I can also suggest tping the player to their death spot immediately after resetting.

2 Likes
local Game = game
local StarterGui = Game:GetService("StarterGui")
local Success
while true do
	Success, _ = pcall(StarterGui.SetCore, StarterGui, "ResetButtonCallback", false)
	if Success then break else task.wait() end --No need to yield if the operation was successful.
end

https://developer.roblox.com/en-us/api-reference/function/StarterGui/SetCore

3 Likes

u dont need a pcall, you can do it just by :

> game["Run Service"].RenderStepped:Wait()
> game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
1 Like