Play is not a valid member of Animation "Workspace.FroDev1002.Katana.Animations.Anims.Idle

So basically I have a script that is suppose to load animations, only problem is IT DOES’NT WORK!


Every time I try to use it I always get the bug

Play is not a valid member of Animation "Workspace.FroDev1002.Katana.Animations.Anims.Idle


I have no clue why this is happening but I cant figure it out. So do you know why this is happing??

local anims = tool:FindFirstChild('Animations')


local function loadAnim(anim) -- load animations
	local loadedAnim = animator:LoadAnimation(anim)
	
	return anim
	
end


local idle:AnimationTrack

idle = loadAnim(anims:FindFirstChild('Idle').Value)


-- equipped
script.Parent.Equipped:Connect(function()
	idle:Play()
end)


-- unequipped 
script.Parent.Unequipped:Connect(function()
	idle:Stop()
end)

should be return loadedAnim I think.

1 Like

I didnt realize that, Some time I can be dumb lol. Thanks!

1 Like

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