Extra = false function onKeyPress(inputObject, gameProcessedEvent) if inputObject.KeyCode == Enum.KeyCode.LeftControl then Extra = true end end function onKeyStopped() Extra = false end game:GetService("UserInputService").InputBegan:connect(onKeyPress) game:GetService("UserInputService").InputEnded:connect(onKeyStopped)
Why does Extra go back to equaling false if the mouse is clicked? Is they're a way to make it equal true even though someone clicks the mouse?
This is because you did not specify what key had to end in order to set extra to false, so any input that ends will set it to false. If this is true, try holding the key, and push another key (do not hold down). If the code is the same, Extra should become false. You can either create a specifier to this (basically copy-paste onKeyPress (with some obvious alterations) or you could ContextActionService.