#How to detect if player resets
1 messages · Page 1 of 1 (latest)
local resetBindable = Instance.new("BindableEvent")
resetBindable.Event:connect(function()
-- Implement custom reset logic here
end)
-- This will remove the current behavior for when the reset button
-- is pressed and just fire resetBindable instead.
game:GetService("StarterGui"):SetCore("ResetButtonCallback", resetBindable)
-- Setting ResetButtonCallback to false will grey out the reset button
-- in the menu and players won't be able to reset in your game.
game:GetService("StarterGui"):SetCore("ResetButtonCallback", false)
Developer Forum | Roblox
If your game uses non-standard characters or there are areas you don’t want players to be able to reset you can now customize the reset button in the CoreGui menu to better suit your game. The API is a SetCore method and is used like this: game:GetService(“StarterGui”):SetCore(“ResetButtonCallback”, BindableEvent) Setting ResetButtonCallback ...
does the above code work at all?
one more question, will it work in local script?
yes