I need help fixing this equip animation flickering, Ive already tried so many different methods and it just doesnt seem to work, And ive looked around the devforum with the same issues but no solutions
My equip animation keeps flickering when its equipped, Its the same code from last time Ive tried it just that I changed the viewmodel itself heres the code for the equip
I’m still sub-new to coding, but I’ve had a similar experience with viewmodels already. I’d say, make sure that if you’re using any functions to either update or play animations, and it’s being done in a render stepped function, use checks and debounces to ensure that the function you made is only being called on one frame. In my code, I wanted to ensure if a player died that not only their viewmodel would be remembered and destroyed, but that when they respawn it would re-equip it and play the equip animation as well. So it all had to be in a renderstepped, and it would flicker the animation because it was being called like 10 times, once every frame for some reason that I guess makes sense. I added a check to make sure the code would only run if the new viewmodel is different from the old one.