I have the player as a ball, and I'm currently scripting the controls. When a WASD key is held the velocity is changed so that the ball moves correspondingly. I currently have multiple while-statements that run when a single key is held, or when a combination of keys are held(WA, SD)
while UIS:IsKeyDown(Enum.KeyCode.W) do --roll forward end while UIS:IsKeyDown(Enum.KeyCode.D) do -- roll to the right end while UIS:IsKeyDown(Enum.KeyCode.A) and UIS:IsKeyDown(Enum.KeyCode.W) do --move diagonally end --etc...
Is there a move efficient way of doing this?