Been looking for an answer all day. Why isn't this working?
Heres what I have inside a Part:
function onTouch(hit) if hit.Parent.Name == "Part" then Workspace.npc.AnimSaves.animheadspin:Play
script.Parent.Touched:connect(onTouch)
EDITED DUE TO COMMENT:
script.Parent.Touched:connect(function(hit) if hit.Parent.Name == "Part" then Workspace.npc.Humanoid:LoadAnimation(Workspace.npc.AnimSaves.animheadspin):Play() end end)
Also, you could just set the DesiredAngle property of Workspace.npc.Torso.Neck
to 100000000000000+, as long as you don't have the script called Animate in the npc. It would stop though after 24 something hours, but servers never last that long.