I have no Idea why this isn't working. I am using an animation for a monster in my game. Also, this is a script and not a local script in case that has anything to do with it.
local Animation = script.Parent.AnimSaves.Run local rig = script.Parent rig:WaitForChild("Humanoid") local humanoid = rig.Humanoid print(Animation.ClassName) print(humanoid) local AnimTrack = humanoid:LoadAnimation(Animation) AnimTrack:Play()
Here is my output:
KeyframeSequence - Server - Script:6
11:06:43.129 Humanoid - Server - Script:7
11:06:43.129 LoadAnimation requires an Animation object - Server - Script:8
11:06:43.129 Stack Begin - Studio
11:06:43.129 Script 'Workspace.Monster.Script', Line 8 - Studio - Script:8
11:06:43.130 Stack End - Studio
wait nevermind i fixed it
local Animation = Instance.new("Animation") Animation.AnimationId = 'rbxassetid://7100391419' local rig = script.Parent rig:WaitForChild("Humanoid") local humanoid = rig.Humanoid print(Animation.ClassName) print(humanoid) local AnimTrack = humanoid:LoadAnimation(Animation) AnimTrack:Play()