Animations are stiff without anything overlapping them?

My fire animation keeps being stiff without any other animations bothering it,

I also have an idle animation that loops and is on Idle Priority and the fire animation presented in the videos are Action Priority, i tried them out by temporarily removing the idle animation but to no avail

Input:

Output:

This is the script i use to load all the animations, it is under starterplayerscripts as a localscript

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local events = ReplicatedStorage:WaitForChild("Events")

local animateTowerEvent = events:WaitForChild("AnimateTower")

local function setAnimation(object, animName)
	local humanoid = object:WaitForChild("Humanoid")
	local animfolder = object:WaitForChild("Animations")
	
	if humanoid and animfolder then
		local animObject = animfolder:WaitForChild(animName)
		
		if animObject then
			local animator = humanoid:FindFirstChild("Animator")
			
			local playingTracks = animator:GetPlayingAnimationTracks()
			for i, track in pairs(playingTracks) do
				if track.Name == animName then
					 return track
				end
			end
			
			local animationTrack = animator:LoadAnimation(animObject)
			return animationTrack
		end
	end
end

local function playAnimation(object, animName)
	local animationTrack = setAnimation(object, animName)
	
	if animationTrack then
		animationTrack:Play()
		
		if object.Parent.Name == "Enemies" then
		
		animationTrack:AdjustSpeed(object.Animations[animName]:WaitForChild("Speed").Value)
		end
	else
		warn("Animation track doesn't exist")
		return
	end
end

workspace.Enemies.ChildAdded:Connect(function(object)
	playAnimation(object, "Walk")
end)

workspace.Towers.ChildAdded:Connect(function(object)
	playAnimation(object, "Idle")
end)

animateTowerEvent.OnClientEvent:Connect(function(tower, animName)
	playAnimation(tower, animName)
end)

if you need any more information you can reply, thank you

1 Like

I tend to set them to Action priority 4 which seems to fix the issue for me.

Hi, I found out a little later that the problem had nothing to do with the animation but the incorrect weldings inside the character, sorry for the waste of time !!

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