Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

HOW TO TRIGGER ANIMATION?

Asked by 10 years ago

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)

1
Please do not use all caps in your question title. AmericanStripes 610 — 10y
0
apologies Shaydesilva 85 — 10y

1 answer

Log in to vote
1
Answered by 10 years ago

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.

0
Hi, the script didn't work. If you could kindly check out my latest question, where I have edited your script accordingly, I would be greatful Shaydesilva 85 — 10y
0
Whoops, let me correct it for you. DiamondBladee 135 — 10y
Ad

Answer this question