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)