So the popular emote scripts that I've been learning off of only allow one thing to happen. You can click it, something happens, then its done. I want to be able to click it, something happens, be able to click it again, something happens again, then it stops. This is the code I'm using:

player = script.Parent.Parent.Parent.Parent.Parent.Character
Animation = player.Humanoid:LoadAnimation(script.Animation1)
Animation2 = player.Humanoid:LoadAnimation(script.Animation2)

function One() -- You can edit these functions to do a certain thing.
script.Parent.Text = "Kamehameha"
player.Arm1.Ka.Me.Enabled = false
player.Arm1.Ka.Ha.Enabled = false
player.Arm1.Ka.Fire:Stop()
player.Arm1.Ka.Charge:Stop()
Animation:Stop()
Animation2:Stop()
end

function Two()
script.Parent.Text = "Base"
player.Arm1.Ka.Me.Enabled = true
Animation:Play()
player.Arm1.Ka.Charge:Play()
wait(6)
player.Arm1.Ka.Me.Enabled = true
player.Arm1.Ka.Ha.Enabled = true
Animation:Stop()
Animation2:Play()
player.Arm1.Ka.Fire:Play()

end

-- Don't edit below unless you know what you're doing.

local O = true
function onClicked() 
if O == true then
	O = false
	One()

elseif O == false then
	O = true
    Two()
end
end

script.Parent.MouseButton1Down:connect(onClicked)

I have no idea how to get more than 2 functions.

2 comments

0

use code blocks, please

0

Uhh, is nobodu gonna respond to this or is it dead