Could someone help with my animation error?
Failed to load animation with sanitized ID rbxassetid://18774757356: AnimationClip loaded is not valid. (x2)
Here’s my module
local manager = {}
_G.animations = {}
_G.humanoid = nil
manager.set_humanoid = function(humanoid: Humanoid)
_G.humanoid = humanoid
end
manager.clear_animations = function()
table.clear(_G.animations)
end
manager.add_animation = function(key: number, animation: Animation)
if _G.humanoid then
local humanoid: Humanoid = _G.humanoid
local track = humanoid:FindFirstChildWhichIsA('Animator'):LoadAnimation(animation)
_G.animations[key] = track
end
end
manager.play_animation = function(key: number)
for _, track: AnimationTrack in _G.animations do
track:Stop()
end
_G.animations[key]:Play()
end
manager.stop_all_animations = function()
for _, track: AnimationTrack in _G.animations do
track:Stop()
end
end
return manager
Here’s my local script
task.wait(1)
animationHandler.set_humanoid(character:FindFirstChildWhichIsA('Humanoid'))
animationHandler.add_animation(gameEnums.animationType.idle, replicatedStorage.Animations:WaitForChild('Idle'))
animationHandler.add_animation(gameEnums.animationType.hit, replicatedStorage.Animations:WaitForChild('WallHit'))