#timer problems
1 messages · Page 1 of 1 (latest)
try it
local plr = game.Players.LocalPlayer
local char = plr.Character
local machtime = 10
local machcooldown = false
local timerCoroutine
local function startTimer()
while machtime > 0 and machcooldown do
machtime = machtime - 1
print(machtime)
wait(0.5)
end
end
UIS.InputBegan:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift and not machcooldown then
machcooldown = true
timerCoroutine = coroutine.create(startTimer)
coroutine.resume(timerCoroutine)
end
end)
UIS.InputEnded:Connect(function(input)
if input.KeyCode == Enum.KeyCode.LeftShift and machcooldown then
machcooldown = false
machtime = 10
print(machtime)
print("mach reset (slowpoke)")
end
end)
ok il see thanks btw
holy crap it works thanks man