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

2 comments

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?

0

use the forum for these questions