speed = 1.0
local function Punch(input)
if input.UserInputType == Enum.UserInputType.MouseButton1 then
punchAnim:AdjustSpeed(speed)
punchAnim:Play()
end
if input.UserInputType == Enum.UserInputType.MouseButton2 then
speed = 0.5
punchAnim:AdjustSpeed(speed)
end
if input.UserInputType == Enum.UserInputType.MouseButton3 then
speed = 1.0
punchAnim:AdjustSpeed(speed)
end
end
UserInputService.InputBegan:Connect(Punch)
I am currently testing the AdjustSpeed() function and I have noticed that the speed only adjusts whilst the animation playing.
E.g. left click first then right click WILL slow the animation down but if you press left click again it goes back to the normal speed.