Stunt Animation Delay

I have part of a script that allows the player who presses LeftControl to do a stunt, my issue is they spam LeftControl causing them to continue on the stunt. What I want is for the player to be able to perform the stunt again once the running stunt ends.
My script:

elseif key.KeyCode == Enum.KeyCode.LeftControl then
				if force >= 30 then
					force = force - 30
					updateStamina()
					local v = Instance.new('BodyVelocity')
					v.MaxForce = Vector3.new(math.huge,math.huge,math.huge)
					v.Velocity = Vector3.new(char.HumanoidRootPart.CFrame.lookVector.X*50,60,char.HumanoidRootPart.CFrame.lookVector
					*50)
					v.Parent = char.Torso
					currentform.flip:Play()
					debris:AddItem(v,.4)
				end

just add a debounce (30 chracters)

1 Like