how to make it so when the player is in combat he cant reset
Set the local StarterGui’s Core, ResetButtonCallback
to false when combat is initiated
game.StarterGui:SetCore("ResetButtonCallback", false)
Needs to be in a LocalScript
1 Like
but i want it to be there just that they cant reset
What do you mean? Do you just want to entirely disable the Reset Button? Or only fire when combat is enabled
the reset button will be there and players that arent in combat can reset but if the player is in combat then no matter how many times he tries to reset it will let him click the gui and everything it just wont reset him
Put the ResetButtonCallBack
inside a function then when combat will be made:
function InitiateCombat()
game.StarterGui:SetCore("ResetButtonCallback", false)
end
InitiateCombat() --This is to connect the function, put this where you want
add a bindable event as the second parameter and connect to the event