I want one of my function to act like a lever, you press a button something happens, you press it again and the thing goes away. Basically, I want to find a way to be able to press a button and have one of 2 things happen depending on if you have already pressed the button or not. For example, I press M to make a menu appear, I press M again to make it go away. I’ve tried finding specific tutorials to no avail.
What do I have to change in this code to accomplish my goal?
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.M then
menu.BackgroundTransparency = 0
end
end)