In my script, I was trying to do something like this: So if you press "T" the script will check the value of a value, if the value is 0 it will proceed but if the value is 1 it will reset and will not do the rest. The rest of the script adds to the value, so like I said before if the value is 0 it would proceed, meaning it will change the value to 1.
function onKeyPress(inputObject, gameProcessedEvent)
if inputObject.KeyCode == Enum.KeyCode.T then
if game.Workspace.Tsundere.Value == 1 then
game.Workspace.Tsundere.Value = 0
else
game.Workspace.Tsundere.Value = (game.Workspace.Tsundere.Value +1)
end
end
game:GetService("UserInputService").InputBegan:connect(onKeyPress)
