Animation not playing, when it should 100%?

Here’s the script:

tool.Activated:Connect(function()
	if not activated and not normalSwingdeb then
		
		sprintEvent:FireServer(false)
		
		activated = true
		normalSwingdeb = true
		
		spawn(function()
			wait(0.5)
			activated = false
			wait(0.5)
			normalSwingdeb = false
		end)
		
		local animload = Right
		
		local animPlay = hum:WaitForChild("Animator"):LoadAnimation(animload)
		
		print(animPlay.Priority)
		
		animPlay:Play()
		
		spawn(function()
			wait(0.2)
			
			SwordEvent:FireServer(script.Parent.Handle:GetTouchingParts(), "Right", script.Parent.Name)
		end)
	end
end)

Visual:


Please help :frowning:

Ton of spawn in your script try this:

tool.Activated:Connect(function()
	if not activated and not normalSwingdeb then
		
		sprintEvent:FireServer(false)
		
		activated = true
		normalSwingdeb = true	
		local animload = Right
		
		local animPlay = hum:WaitForChild("Animator"):LoadAnimation(animload)
	
		print(animPlay.Priority)
		
		animPlay:Play()
		wait(0.5)  ---dosent require to use spawn
		activated = false
		wait(0.5)
		normalSwingdeb = false
	spawn(function()
			wait(0.2)
			
			SwordEvent:FireServer(script.Parent.Handle:GetTouchingParts(), "Right",script.Parent.Name)
		end)
	end
end)

Still doesn’t work, however, you are correct about the spawns.

Maybe put

local animPlay = hum:WaitForChild("Animator"):LoadAnimation(animload)

Outside of the event and see if that does anything?

1 Like

Good idea. I will try right now!

Sadly doesn’t work, I am extremely confused :exploding_head:

Hmm, is it managing to print the Priority of the animation? If so, what priority did you give it? And, probably a dumb question, is there even an animation id stored in animload?

1 Like

Alright. I figured it out! My module was broken. I had a wrong animation id lol

1 Like

Ohhhh haha, least you eventually figured it out! If you have anymore issues don’t be afraid to make another post!

1 Like