Here's the current code. (localscript in tool)

local Tool = script.Parent

local shortstab = Tool.ShortStab


Tool.Equipped:Connect(function(Mouse)
	
	local character = Tool.Parent
	
	local hum = character.Humanoid
	
	local lightstab = hum:LoadAnimation(Tool.ShortStab)
	
	Mouse.Button1Down:Connect(function()
			
		print("Button1Down")
			
		lightstab:Play()
			
		wait(0.2)
			
		lightstab:AdjustSpeed(0)
			
		Mouse.Button1Up:Connect(function()
			
		print("Button1Up")
			
		lightstab:AdjustSpeed(1)
	
	end)
	
	end)

end)

This works when I click and hold for a bit and then release, but if I just click and release immediately (you know, a normal click) it gets stuck in the 0 speed position. How do I allow both clicking and clicking and holding? (If you've ever played blood and iron, you'll get what I'm talking about.)

2 comments

0

Why the AdjustSpeed0 ? A value of 0 is a pause, is that what you are wanting?

0

Yeah, a pause. I didn't know there was a simpler way. Does that make what I'm going for easier?