Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

[Solved]How can I fix my animation script?

I used this script to play an animation:

local function equip()
	equipped = true
	
	--//Get humanoid
	local character = player.Character or player.CharacterAdded:Wait()
	local humanoid = character:WaitForChild("Humanoid")
	
	if humanoid then
		--//Load animations
		pcall(function()
			--//Hold animation
			holdTrack = humanoid:LoadAnimation(holdAnim)
			holdTrack:Play()
		end)
end
end

But I get this error: 10:12:27.271 - Animation failed to load in "Workspace.CaptainD_veloper.Assualt Rifle.Animations.Hold.AnimationId": Animation failed to load

2 comments

0

Make sure 'holdAnim' is correct and is the Animation object with the id. Could also be because you don't own the animation.

0

Oh thats probably why. :P

1 answer

✓ Accepted answer

My educated guess is that you do not own the animation. Make sure you own it or if it is a group game your group owns it. Don't use animations that are not yours.

1 comment

0

Yeah, thats why.

This discussion is preserved as it was. New answers, comments, and votes are closed.