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

10 Likes
This post was updated to showcase a better approach and guidance in the deactivation of the Reset Button.

Well… no. :wilted_flower:


You cannot deactivate the ResetButton without the usage of the ResetButtonCallBack. Although it may sound a bit complex to do so, it’s quite simple. Here’s a step-by-step guidance on a proper manner to applicate the ResetButtonCallBack.


Application guide.

This guide assumes you possess basic knowledge on recognizing services and instances, as well as proper understanding on how to manage Studio with little effort.

  1. Within the Explorer tab, locate the StarterGui service.
  2. Insert a LocalScript in StarterGui.
  3. You’re free to rename the script to your liking, but for this guide, I’ll call it ResetButtonDisabler for testing purposes.
  4. Replace the following block of code:
print("Hello world!")
  • With the lines below.
---// Roblox Services
local StarterGUI = game:GetService("StarterGui")

---// Deactivates the Reset Button
StarterGUI:SetCore("ResetButtonCallBack", false)
print("SUCCESS | Reset button core GUI disabled!") -- Debugging

Error handling. :bug:

However, there’s a slight chance you’ll bump into an error. In the case the CoreGUI for the ResetButtonCallBack has not properly loaded, it’ll return an error other than disabling the reset button, and that’s not what we want. There are various routes to stop this from happening, but I’ll highlight you probably the most efficient one — in my POV.

The repeat loop

  • Develop a pcall() within a repeat loop until the reset button is successfully disabled with a print() method for debugging purposes. Not very useful in this case, but it’s best to start adding debugging methods to identify potential errors.
---// Roblox Services
local StarterGUI = game:GetService("StarterGui")

---// Deactivates the Reset Button
repeat -- Starts the repeat loop
	local success = pcall(function() 
		StarterGUI:SetCore("ResetButtonCallback", false) 
	end)
	task.wait(1) -- Cooldown to avoid freezing
until success -- Runs the loop until the Reset Button is disabled.
print("SUCCESS | Reset button core GUI disabled!") -- Debugging

I hope I managed to full-fill your request. Have a nice day! :wink:

57 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.

13 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

4 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

2 years later haha, anyway that is pretty bad in my opinion, first of all, you should never type variables like that, and also that may not work anyway. The reason for the pcall in the first place is because it does error, I’ve had experience of it erroring sometimes, so putting it in a pcall a loop, preferably with a timeout delay, then your in the golden. You need a timeout delay just in case it could loop and error for a while.

2 Likes

yeah i was dumb back then, now i have learned about pcall function

Learning is the best part of the journey, cheers, mate!