I came up with this awhile ago, the reset button gets disabled but the playerlist only gets disabled in the studio, not in the actual game. Anyone got a clue why? It’s a localscript inside starterplayer scripts:
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)
coreCall('SetCoreGuiEnabled', Enum.CoreGuiType.PlayerList, false)
(it’s also under a client.CharacterAdded event as well)
SetCoreGuiEnabled and GetCoreGuiEnabled never fail, so you don’t need to wrap them.
For SetCore, I do this.
local function SetCoreAsync(Name: string, Value: any): boolean
local MaxRetry = 8
local Interval = 1
for Retry = 1, MaxRetry do
if pcall(StarterGui.SetCore, StarterGui, Name, Value) then
return true
end
task.wait(Interval)
end
return false
end
SetCoreAsync("ResetButtonCallback", false)
Kind of crummy that there’s no core registration signal.