Unable to cast value to Object

Im confused on why this is happening

local player = game.Players.LocalPlayer

local scratchHeadAnim = "rbxassetid://6834058412"
local Animator = player.Character:WaitForChild("Humanoid").Animator

local loadedScratchingAnim = Animator:LoadAnimation(scratchHeadAnim)

What did i do wrong?

:LoadAnimation() only takes the Animation Instance at the moment your trying to load an animation with a string value.

Here’s a resource
https://developer.roblox.com/en-us/api-reference/class/Animation

2 Likes