[SOLVED] Bound action functions do nothing?
Asked by
5 years ago Edited 5 years ago
01 | function moveMenu(actionName, inputState, inputObj) |
02 | if inputState = = Enum.UserInputState.Begin then |
03 | if GuiService.SelectedObject ~ = nil then |
04 | if (inputObj.KeyCode = = Enum.KeyCode.Left or inputObj.KeyCode = = Enum.KeyCode.A) then |
05 | changeAngleOffset(- 45 ) |
06 | elseif (inputObj.KeyCode = = Enum.KeyCode.Right or inputObj.KeyCode = = Enum.KeyCode.D) then |
15 | function thumbstickMoveMenu(actionName, inputState, inputObj) |
16 | if inputState = = Enum.UserInputState.Begin then |
17 | local pos = inputObj.Position |
19 | if GuiService.SelectedObject ~ = nil then |
20 | changeAngleOffset( 45 * math.sign(pos.X)) |
These functions are supposed to make a GUI rotate 45 degrees in a given direction with the arrow keys and left thumbstick, respectively.
However, while both of them are in the console's ActionBindings list, they don't do anything, and nothing is showing up in the output, so I'm not sure what the problem is.