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

NPC Animation Script Not working? No Output. Not working anymore

Asked by 6 years ago

Hello,

This script has always worked for me. I am not sure why it is not working now. There is no output.

Thanks, Anthony

local Epic= script.Parent.Parent.Open
function onClick()
local Ens = game.workspace.Ensemble.Humanoid:LoadAnimation(game.workspace.Ensemble.Animations.Whatsindie)
local Ens2 = game.workspace.Ensemble2.Humanoid:LoadAnimation(game.workspace.Ensemble2.Animations.Whatsindie)
Ens:Play()
Ens2:Play()
end
Epic.MouseClick:connect(onClick)

1 answer

Log in to vote
0
Answered by
thesit123 509 Moderation Voter
6 years ago

If this script is in a StarterGui, the object, Epic, should be a TextButton.

and make sure to fully type the event:

Epic.MouseButton1Click:connect(onClick)

MouseButton1Click is left button of the mouse. Plus, you should have a wait function to not cause the to animation to overlap, if possible.

Ens:Play()
wait(SecondsOfTheFirstAnimationLast)
Ens2:Play()
Ad

Answer this question