I have tried with a simple .Died event, but how do I know if the player reset? Is there a callback?
✓ ANSWER ACCEPTED
How do I know if a player has reset and not died from another cause?
1 answer
✓ Accepted answer
If you look at SetCore
You are able to see "ResetButtonCallback"
You can assign it either a bool (false to disable reset) or a bindableEvent callback to execute whenever the player requests it.
Here's an example of how to use it.
local reset = Instance.new("BindableEvent")
reset.Event:connect(function()
print("Reset Requested")
end)
game:GetService("StarterGui"):SetCore("ResetButtonCallback", reset)
everytime the player tries to reset, it will print out 'Reset Requested'
This discussion is preserved as it was. New answers, comments, and votes are closed.
