So I have a script that makes an npc do an animation.
But I keep getting this error
Does anyone know why? Also my code
local function loadCharacter(charName)
local char = game:GetService('ServerStorage'):FindFirstChild('Characters'):FindFirstChild(charName):Clone()
local anim = char.Humanoid:LoadAnimation(script:FindFirstChild('Anim'))
char.Position = Vector3.new(42.064, 5.445, 15.961)
char.Parent =workspace
anim.Looped = true
anim:Play()
end
wait(1)
loadCharacter('Dummy')