so i wanted a gui button that can toggle on and off the reset button any ideas?
1 Like
Consider searching before posting next time.
local playerGui = script.Parent
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
This should be a local script in StarterGui.
2 Likes
@HedTB_Dev that doesn’t work anymore. Use:
local coreCall do
local MAX_RETRIES = 8
local StarterGui = game:GetService('StarterGui')
local RunService = game:GetService('RunService')
function coreCall(method, ...)
local result = {}
for retries = 1, MAX_RETRIES do
result = {pcall(StarterGui[method], StarterGui, ...)}
if result[1] then
break
end
RunService.Stepped:Wait()
end
return unpack(result)
end
end
coreCall('SetCore', 'ResetButtonCallback', false)
3 Likes
what should i do this with this script?
This script manages to disable or enable to Reset Button. You want a debounce, right? Show me your toggle script.
It does work. I’ve tried it myself.
Weird enough, for me it doesn’t get registered by the CoreScripts.
1 Like
so i put the script inside the gui button and it dosent work for me
this is the script
local coreCall do
local MAX_RETRIES = 8
local StarterGui = game:GetService('StarterGui')
local RunService = game:GetService('RunService')
function coreCall(method, ...)
local result = {}
for retries = 1, MAX_RETRIES do
result = {pcall(StarterGui[method], StarterGui, ...)}
if result[1] then
break
end
RunService.Stepped:Wait()
end
return unpack(result)
end
end
toggle = true
script.Parent.MouseButton1Click:Connect(function()
if toggle == true then
toggle = false
coreCall('SetCore', 'ResetButtonCallback', true)
elseif toggle == false then
toggle = true
coreCall('SetCore', 'ResetButtonCallback', false)
end
wait()
end)
nvm there was a gui blocking the button lol
First off, you don’t need the wait(). Secondly, you should switch the coreCalls, since you are firstly activating the button, and then deactivating it.
is okay it was my other gui that’s blocking the button,
it works
1 Like