Need some help with animations

I’m making a platformer and wanted some animations so i made a run and a idle but every time they switch it buggs out and the character gets duplicated 3 times for a single frame the code i am using is

and the

animations im using are

You should check that all your image files are the same size.
Aside from that, not sure what could cause the issue.
If you can share an in-game screenshot or video, it might help.

To add to what @Gruk wrote, also check the origin for each frame is in the same place.

I’d also consider using a Trigger Once condition in the 2 subevents.

i changed it so the size is exactly the same and centered all the animations and i relized that it is not duplicating it is in fact moving to the left for 1 frame then far to the right for 1 frame before it teleports back
NOTE: the gifs low fps doesn’t show it to well but you kinda get the point but what you see happens 5 times faster and every time it switches between animations

That’s not an animation issue. That’s the sprite positioning issue. It’s almost like its being placed where the mouse is. Do you have any events that put the player at the mouse co-ordinates?

oh nonoononono its not connected to the mouse at all that was a pure coincidence it also warps to the right but the low fps of the gif prevents you from seeing that the only movement script i have is one that puts the character on the other sprite named hit box which is invisible

You can reproduce this effect by misaligning the origin point of a frame of the sprite animation.
It might be that somehow one of the points is not the same as the other points?

1 Like

Thank you so much. I checked and the points were completely off on the idle animations so i just moved it and now it works perfectly thanks.

1 Like