local uis = game:GetService("UserInputService") local player = game.Players.LocalPlayer repeat wait() until player.Character ~= nil local character = player.Character local Humanoid = character.Humanoid

z_ = false example = Humanoid:LoadAnimation(script.Animation)

uis.InputBegan:connect(function(input, event) if not event then if input.KeyCode == Enum.KeyCode.Z then if z_ == false then Humanoid.WalkSpeed = 0 wait(1)
example:Play() z_ = true

wait(2) Adjust (float speed = 0)

elseif z_ == true then example:Stop() z_ = false Humanoid.WalkSpeed = 16 end end end end)

--I'm having trouble getting the "wait(2) Adjust (float speed = 0)" to properly work.