Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

How can I make a "sprint cooldown" script?

Asked by 4 years ago

Im trying to make a sprint cooldown script with a gui, could u send me a tutorial for it? pls dont send me a full script bc i want to learn more about tweening sprint script:

local player = game.Players.LocalPlayer
local mouse = player:GetMouse()
repeat wait() until player.Character and player.Character:FindFirstChild("Humanoid")
local char = player.Character

local hum = char.Humanoid

local run_Anim = hum:LoadAnimation(script.ExportAnim)

mouse.KeyUp:connect(function(key)
    if string.byte(key) == 114 then
        run_Anim:Stop()
        hum.WalkSpeed = 16
    end
end)

mouse.KeyDown:connect(function(key)
    if string.byte(key) == 114 then
        run_Anim:Play()
        hum.WalkSpeed = 32
    end
end)

~Lowmeister

0
"a sprint cooldown script with a gui"? This script shows you using the deprecated mouse.KeyDown function, what does this script have to do with a gui? AizakkuZ 226 — 4y
0
use the forum for these questions WideSteal321 773 — 4y

Answer this question