Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

HOW TO TRIGGER ANIMATION?

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)

2 comments

1

Please do not use all caps in your question title.

0

apologies

1 answer

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.

2 comments

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

0

Whoops, let me correct it for you.

This discussion is preserved as it was. New answers, comments, and votes are closed.