Ok, for example.
UIS = game.GetService("InputService") UIS.InputBegan:connect(function(input) if input.KeyCode == Enum.Keycode.KeypadSeven then if arrowgui1 == true then -- This gets skipped and just goes to the script instantly. print ("Cannot go left") end end end)