I was looking how to disable the reset button without it not working half the time. I found out that a repeat loop should be fine, but I have no way to check if the loop should stop (once it has been disabled.) I tried using GetCore() although that didn’t work. I basically want it to self-destruct the script after disabling the reset button since it isn’t needed.
local function disable()
game.StarterGui:SetCore("ResetButtonCallback",false)
end
repeat disable() until (game.StarterGui:GetCore("ResetButtonCallback") == false)
wait(.1)
script:Destroy()
GetCore for some reason doesn’t have a return for ResetButtonCallback, so you’d have to find other ways to make it so that it is certainly disabled, maybe do it when the game is loaded via the game.Loaded event or when the Player’s Character is fully loaded to name a few
local function disable()
game.StarterGui:SetCore("ResetButtonCallback",false)
end
repeat disable() until game:IsLoaded() and game.Players.LocalPlayer.Character
wait(.1)
script:Destroy()
It hopefully should do that, since those 2 ways are most definitely good ways of making sure the client is fully loaded in by the time Resetting should be disabled as to reduce the chances to slim levels.
I would recommend testing it a few times to ensure it disables it all the time