Playing animations only on the client

Okay so, Roblox likes to update animation data to the server for whatever reason. Now normally this wouldn’t be an issue, but for my movement animations there are 8 animations playing at once, which the animation weights are adjusted smoothly to give a nice effect.

The only downside to this is that because of 8 different animations having their weights and speeds and whatnot updated, you quite often get warnings saying that a player is spamming events (alongside a massive ping spike)

SO wrapping this up, I want to basically play all the movement animations purely on the client, in which I will update a couple of attributes to the other players (such as movement and input direction), which the other clients will make the animations and adjust them accordingly. How can I stop the server from playing animations? Attempting to stop the animations immediately after them playing with this code:

		Animator.AnimationPlayed:Connect(function(Track)
			
			local AllPlayingTracks = Animator:GetPlayingAnimationTracks()
			for i, LoopedTrack in AllPlayingTracks do
				if table.find(AnimationConfig.BannedServerSideAnimationsIDs, LoopedTrack.Animation.AnimationId) then
					LoopedTrack:Stop()
				end
			end
			
		end)

Does not seem to work.

Any reply is appreciated :]

Hi, :Stop() expects a fadeTime argument, which is supplied with an obscure number by default, read more at the link. Just supply it with 0.

Im pretty sure if :Stop() isn’t supplied with any arguments it will use 0 as a default stop time.

Well, the docs say it’s 0.100000001 by default which is supposed to work but I guess your movement system might outrun this number.

1 Like

okay is not exactly the solution I wanted but as sent in this post

you can create a new animator instance on the client, which it then wont be updated to the server considering it doesnt exist on the server. Although the downside to this is every single animation needs to be manually updated to other clients if you want it to replicate.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.