There’s three mistakes worth fixing here.
-
Use a different animation priority. All character animations run at the Core priority and the Jump animation runs at the Idle priority. Your animation could be getting overwritten by default animations.
-
You have one too many waits in your while loop. At the very least, if all of them are needed, try to avoid yielding at the beginning of an iteration.