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

[ SOLVED ] Why won't animation in NPC play when press a GUI button?

Hi. There's a button in a gui and it's supposed to play an animation inside of an NPC, but it won't. I even stopped the old animation that was looping in the NPC, but it didn't even stop the old animation! By the way, this script worked before, despite another animation playing. Script (Normal Script):

script.Parent.MouseButton1Click:Connect(function()
	
local animation = workspace.Gino.Gino.Script4.Animation
local humanoid = workspace.Gino:WaitForChild('Humanoid')
	local dance = humanoid:LoadAnimation(animation)
	workspace.Gino.Gino.Script.Animation:Stop()
dance:Play()
	
	
end)

Thank you!

2 comments

0

Could you send a Gyazo of your Explorer Panel? Which should show the descendant instances of "Gino".

0

@ThatSnowyDerp, hi, thanks for responding! How do I do that? The Gino NPC is in Explorer, then workspace, then in a model called Gino.

1 answer

I did it on my own, but thanks to anyone who tried! I ended up doing remote events to fire it instead.

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