Make move only work after playing an animation

Hey, I am working on a Kame Hame ha move but I want to make it holdable.
It consists of 3 Animations. 1, Startup. 2, hold. 3. Do move. I want it to play the Startup before it can do the Do move animation the script uses 2 parts Hold move and Release

Local script

UIS.InputBegan:Connect(function(Input,isTyping)
	if isTyping then return 
	elseif Input.KeyCode == Enum.KeyCode.G then
		if Debounce.Kame == false and Move == false then
			
			Move = true
			Debounce.KameAct = true
			Moves.KameRP:FireServer(true)
		end
	end
end)



UIS.InputEnded:Connect(function(Input,isTyping)
	if isTyping then return 
	elseif Input.KeyCode == Enum.KeyCode.G and Debounce.Kame == false  then
		Debounce.Kame = true

		Moves.KameRP:FireServer(false)

		
		
		wait(Coldounces.Kame)
		Debounce.Kame = false
		Move = false
	end
end)

Server Script

--I don't actually wanna leak my code so

Moves.KameRP.OnServerEvent:Connect(function(Player,Active)
if Active  == true then
 --Plays KameStart anim
else
--does the actual move
end
end)

You could disable the controls of the player temporarily
Here how could you do it

local controls= require(player.PlayerScripts.PlayerModule):GetControls()

controls:Disable() --disable controls
controls:Enable() --enable controls

This is in local script right?

This should only work on local script yes

I dont think this woud solve my problem as it shoud just wait if the animation plays and then just resume

oh my bad I read it as you meant to stop the player to move during the animation

so your problem is that the first animation gets cut when you release the button?

Yeah i want it to play the first animation completely and then you should be able to release it again

You can either play the animations in order after the button is pressed or if you want to maintain the hold mechanism you could check with InputEnded if the first animation is still playing it will ignore the next animation else it will play it

Just use debouncing as you have done to prevent animations from playing on top of eachother.

You can always consult the “IsPlaying” property of the AnimationTrack instance which stores/holds a Boolean variable which describes if the AnimationTrack is actively playing or not, with this information you can allow the animation to finish playing before starting the playing of another or start playing an animation immediately if one currently isn’t being played.