Roblox bug or is it my?
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.
1 | if Direction = = Enum.KeyCode.Up then |
2 | Button.Position = UDim 2. new( 0 , 0 , 0 , Button.Position.Y.Offset - 160 ) |
4 | elseif Direction = = Enum.KeyCode.Down then |
5 | Button.Position = UDim 2. new( 0 , 0 , 0 , Button.Position.Y.Offset + 160 ) |
Any suggestions or tips will help, thanks.