hi! trying to make the default reset button in the “esc” menu of roblox not kill the player, but instead play an animation and teleport them somewhere. i can do the animation and teleport part, i just can’t figure out how to replace the reset button functionality.
i found this post announcing that it’s possible with some code examples, but i just can’t get them to work. i know it’s meant to be in a localscript, but putting it in StarterPlayerScripts or StarterCharacterScripts gives me a SetCore: ResetButtonCallback has not been registered by the CoreScripts error.
this is my specific code, if that helps:
local resetBindable = Instance.new("BindableEvent")
resetBindable.Event:connect(function()
print("Reset!")
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)