THECRAZYSANS wrote:

I been having problems with lag in my animations, i just need a code to prevent it

I can't prevent lag if I don't know what's causing or creating the lag in the first place.

If I remember correctly, the “wait (0) secs” block is limited to 30 fps. This means that unless you use a custom block without screen refresh, or don't use a wait block, you're limited to 30fps. By no means is 30fps good, but people still make it work. You can use math to calculate the duration of an animation like this:

# of frames / frame rate for example if I have 30 frames at 30 fps: 30 / 30 = 1. This means that the duration of the animation will be 1 second.

Source

I'm hoping that this is what you're talking about, but if it's not, then I need more information. Preferably the link to the game along with the detailed description of the problem along with what code do you suspect is causing it.