(Solved) How do I make a button that toggles an animation on and off?

Say something had a default animation set to #0 and I wanted to hover my mouse on it and click it and right when I click it, it’s animation changes to #1. but when I click on it again however, it changes right back to animation #0. How do I do this?

It will be like
Condition_____________________ Action
{If cursor of touch is on (X)
Current animation of (X) is 0
Left Mouse button down } = Change the animation of (X) to 1
Another event
{If cursor of touch is on (X)
Current animation of (X) is 1
Left Mouse button down } = Change the animation of (X) to 0

1 Like

Here’s what my events look like, but it doesn’t seem to work. What is it you see wrong that I need to change?

Sorry, My mistake open this Example. This will help you.

Thank you. I decided to change it up from a key is pressed to left mouse is pressed and that also works :smile:

3 Likes