Animation Stopping from seperate Script Not Connected To Animation Player Script

I need to stop an animation from playing (The animation started playing from a separate script)
The script works the animation stops playing but the script ends on line 3 and sends an output error
it says AnimationId is not a valid member of AnimationTrack “Animation”

		local ActiveTracks = char2.Humanoid:GetPlayingAnimationTracks()
		for _,v in pairs(ActiveTracks) do
			if v.AnimationId == "rbxassetid://17277645993" then
				v:Stop()
			end
		end
local ActiveTracks = char2.Humanoid:GetPlayingAnimationTracks()
		for _,v in pairs(ActiveTracks) do
			if v.Animation.AnimationId == "rbxassetid://17277645993" then
				v:Stop()
			end
		end

this should be the fixed code

1 Like

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