#cooldown wont activate

1 messages · Page 1 of 1 (latest)

subtle beacon
#

honestly it used to work fine idk what happened ```lua
local uis = game:GetService("UserInputService")
local character = script.Parent
local humanoid = character:WaitForChild("Humanoid")
local flashstep = game.ReplicatedStorage:WaitForChild("flashsteps")
local flashstepOFF = game.ReplicatedStorage:WaitForChild("flashstepsOFF")

local baseplate = workspace.Baseplate

local spin = game.ReplicatedStorage.Anims:WaitForChild("spin")
local spinTrack = humanoid:LoadAnimation(spin)

local debounce = false
local flashtepping = false

local function endFlashstep()
flashtepping = false
spinTrack:Stop()
humanoid.WalkSpeed = 16
flashstepOFF:FireServer()
task.wait(1)
debounce = false
end

uis.InputBegan:Connect(function(input, gpe)
if input.KeyCode == Enum.KeyCode.E or input.KeyCode == Enum.KeyCode.ButtonR1 and not debounce and not flashtepping and not gpe then
debounce = true
flashtepping = true
spinTrack:Play()
humanoid.WalkSpeed = 60
flashstep:FireServer()
task.spawn(function()
task.wait(2)
if flashtepping then
endFlashstep()
end
end)
end
end)

uis.InputBegan:Connect(function(input, gpe)
if input.UserInputType == Enum.UserInputType.MouseButton1 and flashtepping and not gpe then
endFlashstep()
debounce = true
wait(2)
debounce = false
end
end)

topaz crown
#

maybe roblox did not read some inputs since the code was mashed, it happends to me sometimes

#

this engine is awful

#

i tried fixing the code and making it more layered to roblox

subtle beacon
topaz crown
#

Ur code seems fine

#

Its prob a roblox glitch

#

It happened to me yesterday (smthing similar)

#

Try making the code and gradually add the cooldown settings

#

Also check the flashstep bindable script