What do you want to achieve?
To be able to stop looped animations using RemoteEvents
What is the issue?
There’s no way to save each AnimationTrack which means any animation that is looped will play forever and there is no way to stop it.
What solutions have you tried so far?
I tried using a RemoteFunction to return the animation track, but it came back as nil.
Make the variable of AnimationTrack out of this scope, i.e. global on script. Declaring it is enough, then setting it is when you load the animation once.
Maybe you should execute LoadAnimation on the animations you need, then set their properties. The event should only play the animation track. Although it is more common to just execute the animation based on invocations from events in game.
Ah, okay. I think you’re trying to load every possible animation on every humanoid that is not the player’s only? You’d probably need some sort of LocalScript that a player’s client can load all this humanoids without having the server to call for it(expect latency when using remotes).
For temporary solution of your problem, try using a new remote with an appropriate name, then do the same thing as I have mentioned in aforementioned post(move variable out to global scope). If you have many animations, use a table. Fire to this event to then stop the animation if needed.
There’s no Player Loaded Animations (yet) so it’s just loading the Dummy’s Animations. I probably shouldn’t use the Server to load them because the game already uses the Server a lot and I think handling Animations locally will help it a lot,
You’re not wrong when it comes to handling animations. A client should be handling these as you mentioned. Unless these animations somehow have some game critical mechanics related to them…