I am trying to change the position of a gui by using either the up arrow key or the down arrow key. For some reason B prints but the position doesn't change, but if I move B to where A is, it want to work. Both A and B work, but B position doesn't change, only A. Sorry if this is confusing, it will make more sense when you read the code.
if Direction == Enum.KeyCode.Up then Button.Position = UDim2.new(0, 0, 0, Button.Position.Y.Offset - 160) print("A") elseif Direction == Enum.KeyCode.Down then Button.Position = UDim2.new(0, 0, 0, Button.Position.Y.Offset + 160) print("B") end
Any suggestions or tips will help, thanks.