Latency with AnimTrack:AdjustSpeed() on ServerScripts?

I have been trying to make an equip, unequip, and idle animation all in one single animation, for a series of weapons by animating the equipping of a tool, AdjustSpeed(0)'ing it once it reaches the idle keyframe, and then AdjustSpeed(-1)'ing it when it is being unequipped. The AdjustSpeed(0) is called when a specific Keyframe is reached, with the name of “Idle”. Sometimes, the animation freezes before the idle keyframe has been reached, or never freezes at all and (since the animation does not loop, and the idle animation is the last keyframe in the anim), ends the animation and stops playing. I’m no expert, but I assume that this issue is caused by the Server lagging a bit, causing the AdjustSpeed to either fire early, or too late. How should I go about solving this? I’m guessing I could play the animations on the client, but then how would I replicate the animations to the server? If client-side animations replicate to the server, wouldn’t that allow exploiters to do naughty things? Also, these weapons deal damage where they are in world-space. Everyone must see where the weapons are in the same place.

Play them on the client. Replication is automatically handled by the Animator object. Animations are primarily meant to be handled by the client if you’re expecting a smooth experience. Exploiters can’t play bad animations unless you upload or own said bad animations; even then, it’d be a non-problem because that’s unrelated to your current situation. Whether you played your gun animations from the server or the client, they can just play animations independently of your system.