AnimationTrack replication issues

Hey! So I’ve ran into a pretty weird problem regarding keyframe markers.

Essentially, I want the server to listen into any markers that get ran in order to help with a bit of animation manipulation, the difficult part is that Roblox doesn’t seem to really provide any way of differentiating animation tracks.

I seem to have hit a total dead end here, and I genuinely need help with figuring out how to index and reference already existing animation tracks that aren’t playing!

Are there any workarounds I could use to achieve such an outcome? Thanks in advance!

So, your goal is to change the animation when it hits a marker on the server?

Err, not exactly.

Essentially, I want to change the timeposition of an animation when it hits a marker.

The main issue however is that Roblox currently doesn’t have the proper tools to help the server differentiate animations that are loaded on the client, and that makes things a lot more difficult to handle since all animations look the same other than the animation markers.

I don’t think I’m understanding this right, but can’t you use a RemoteFunction to ask the client to differentiate the animations for you?

If it helps you with understanding better, it’s a reload animation.

Essentially, instead of making multiple animations I’ve made a single animation that’s comprised of readying the gun for reloading and loading a single round into the weapon, the server will repeat that part of the animation until it’s deemed fit to stop in which case it’ll finish the animation.

As much as I’d like to use a RemoteFunction, I fear that it may be abusable in that situation, it may also take too long for the server and the client to interact in time which would cause a catastrophic error.

1 Like

AnimationTracks come with the context of handling their own methods, the GetMarkerReachedSignal (KeyframeReached is superseded by this one) event hooks will only provide information relevant to the animation it’s fired from as it has to be connected to the AnimationTrack itself to fire.

As per your problem relating to the server reading this information, the reached keyframe event should be listened for on the client instead. You should make appropriate workarounds and focus on modifying the animation only on the client to avoid headaches in future. If you need to tell the client something, it’s okay to use a RemoteEvent.

Ah, fair enough. Thank you for this information.