Player walking on the left instead of walking forward

function taskAppear()
print(uiTask)

uiTask.visibility = Visibility.FORCE_ON
print(uiTask.visibility)
UI.SetCursorVisible(true)	
UI.SetCanCursorInteractWithUI(true)
Task.Wait(10)
uiTask.visibility = Visibility.FORCE_OFF
UI.SetCursorVisible(false)	
UI.SetCanCursorInteractWithUI(false)

end

After making the cursor visible the player start to walk leftside instead of forward?
Why the animatiomn of the player is corrupted?