I have a backflip move for my game, and it relies on KeyframeReached to fire it’s backwards force. It has always worked for me, but someone sent me a video in which it did not fire.
At 1:17, the event doesn’t fire.
I assume this has to do with the amount of lag he’s experiencing. Nevertheless, is there way to fix it? The event I use is:
In a LocalScript, mind you.
I suggest for the time being to just say after ~2 seconds, if KeyframeReached hasn’t fired since the animation started playing (using a local timestamp to detect the lastest time the animation started playing), do what should be done at KeyframeReached.
Though it would seem weird that it just stopped working - I assume you haven’t changed the animation in any way.
No, it fires when a named Keyframe is reached. Haven’t changed the animation for months, and it has to be more precise than ~2 seconds - which is why I decided to use KeyframeReached in the first place.
I am suggesting this as a safecall method - in case KeyframeReached doesn’t work, wait a little longer and then turn the effect off. If it works, everything is fine, and the safecall method won’t change anything.
I’ve only used KeyframeReached for i.e. spark particles when a blacksmith hits an anvil with his hammer, and I haven’t heard of any incidents - though that doesn’t affect players as much as animations working on their character.
Oh, okay, I’ll use it as a temporary solution.
I did mess with this when I made animations able to play backwards, but I also did really extensive testing to make sure it worked. I could have missed something. It could also be on the animation editor and it was exported incorrectly?
Pretty sure it has to do with how much lag he’s experiencing. The event fires locally, and people who played the game with a decent/good PC hasn’t come across this problem. I could be wrong, though.
Take this function:
_G.insert = function(id)
local items = game:GetObjects("http://www.roblox.com/asset/?id="..id)
for _,v in next,items do
v.Parent = #game.Selection:Get() == 1 and game.Selection:Get() or workspace
And then use it to insert your animation into studio:
It’ll look something like this:
< animation that came from >
Just so Davidii can confirm there’s nothing wrong with the animation editor, you’d be doing him a solid by posting a screenshot of the components of your animation.
This is the result. “backflip” is what I named the Keyframe it checks for.
This bug is hard to reproduce because there is an isolated issue causing it to only happen on certain Animations, but it does exist, and I’ve seen it personally.
I ended up writing my own animation task scheduler so I could detect it reliably.