i think i might've done smth wrong here trying to make an npcs play an animation i get this error :
Unable to cast value to Object
function Modules.PlayAnimation(char : Object, AnimCodeString : string)
if char.Humanoid then
local AnimString = "rbxassetid://" .. AnimCodeString
local AnimTrack = char.Humanoid:LoadAnimation(AnimString)
AnimTrack:Play()
else
print("Humanoid Not Found")
return -1
end
end