local player = game.Players.LocalPlayer local character = player.Character or player.CharacterAdded:Wait() local humanoid = character:WaitForChild("Humanoid") local animation = Instance.new("Animation",character) local animationId = "rbxassetid://4873199438" if humanoid then wait(3) local loadAnimation = character.Humanoid:LoadAnimation(animationId) loadAnimation:Play() end
You need to cast the AnimationObject to the Humanoid
, not the ID:
local Animation = Instance.new("Animation") Animation.AnimationId = "rbxassetid://"..4873199438 Animation.Parent = Character --// Secondary argument of Instance.new was deprecated Character.Humanoid:LoadAnimation(Animation):Play()
If that helped, don’t forget to accept this answer!