Is there a way do animation when pressing a button like let say a and then you press it again it will replay the animation but backwards

i want a animation to play when i press A but when i press a again it will play the same animation but backwards like a toggle on and off

You could use a boolean variable. Toggle the boolean each time the key is released. Then you flip the animation scale between a positive and negative value.

I’m on my phone, so I don’t have a keyboard so I used a button.

Thank you this should work

1 Like

so for whatever reason it wont work

It needs either a trigger once or use the key was released. Otherwise, it will repeatedly toggle the state.

Also, unless you’re looping the animation, you might need to set the frame to the first and/or last frame and maybe use play or resume or whatever the action is.

yeah i also try that


the text seem to work so that good

I originally tested it with a looping animation. A static animation doesn’t seem to want to go backwards from the last frame.

This seems to work. Setting it to another frame before setting it to the last. It might be easier to just create another animation with the frames in the reverse order.

IDK if the pause is needed. I was doing a lot of testing. I even tried inserting a wait,thinking that it was a timing issue.


yeah i did this and it work now i have one last question why does it take like 3 seconds to load the scene when there is only 4 object and i don’t think it my PC

1 Like

No idea why it would take that long. Is it from the launch to preview or switch scenes?

I’m a launching it from the preview so that might be why and i have a object that 2000 by 900

i know why now cause the game is in the cloud and not on my PC so it take the same amount of time to load it that it would take for me to load it if i made build i believe but i rather have it on the cloud so then if something happen i can still find it

1 Like