#how do i make cooldown!?
83 messages · Page 1 of 1 (latest)
VIARABLES--
local debounce = false
local interAttack = false
local attacked = false
local damaged = false
at the start make debounce true
then at the end
make a task.wait
and put the cooldown time
then debounce = false
after the if ... then stuf
wdym
@frosty acorn
what should i change rn, idk what you mean @frosty acorn
Blud
Okay firstly instead of using
'If debounce == false then'
Use
'if not debounce then'
Put debounce = true right after the ' if not debounce then '
im still working on it
im still a beginner so im thinking what next
(ive never used a table before)
Then all the way at the end put a task.wait()
Then debounce= false
And in the brackets of the wait put how long you want the cooldown to be
there is no debounces
Okie dookie
should i add one?
Yes
alright
ill let you know after i putted in what you just said
@frosty acorn
variable is false btw
Yes 
it doesnt work sadly
Show full script
At the start when U do local debounce= make sure it's false
Wait bro wtf have U done
Wait
Nvm
It's good
--VIARABLES--
local tool = script.Parent
--PLAYER VIARABLES--
local playscr = game:GetService("Players")
local player = playscr.LocalPlayer
local character = player.Character
--ATTACK VIARABLES
local debounce = false --maybe im gonna use it--
local attacked = false
local damaged = false
local cooldown = 0.75
--ANIM VIARABLES--
local Swing1 = script.Parent.Swing1
local Swing2 = script.Parent.Swing2
local EquipAnim = script.Parent.EquipAnim
local IdleAnim = script.Parent.IdleAnim
local Idle = character:WaitForChild("Humanoid").Animator:LoadAnimation(IdleAnim)
Idle:Play()
Idle.Priority=Enum.AnimationPriority.Action4
--EQUIP VIARABLES--
local equiping = true
local equipped = false
--1 COOL VIARABLE--
local handle = tool.Handle
--SCRIPTS------------------------------------------------------------------------------------------------
tool.Equipped:Connect(function()
tool.Handle.Unsheath:Play()
local AnimTrack = tool.Parent:FindFirstChild("Humanoid").Animator:LoadAnimation(EquipAnim)
AnimTrack:AdjustSpeed(1)
AnimTrack:Play()
AnimTrack.Priority=Enum.AnimationPriority.Action3
task.wait(0.18)
Idle:Play()
end)
tool.Unequipped:Connect(function()
task.wait(0.02)
Idle:Stop()
end)
@frosty acorn
yeah
k
this isnt the full script?
wheres the activated part?
and connections
u can send it with txt file
holy fuck thats so long
--VIARABLES--
local tool = script.Parent
--PLAYER VIARABLES--
local playscr = game:GetService("Players")
local player = playscr.LocalPlayer
local character = player.Character
--ATTACK VIARABLES
local debounce = false --maybe im gonna use it--
local attacked = false
local damaged = false
local cooldown = 0.75
--ANIM VIARABLES--
local Swing1 = script.Parent.Swing1
local Swing2 = script.Parent.Swing2
local EquipAnim = script.Parent.EquipAnim
local IdleAnim = script.Parent.IdleAnim
local Idle = character:WaitForChild("Humanoid").Animator:LoadAnimation(IdleAnim)
Idle:Play()
Idle.Priority=Enum.AnimationPriority.Action4
--EQUIP VIARABLES--
local equiping = true
local equipped = false
--1 COOL VIARABLE--
local handle = tool.Handle
--SCRIPTS------------------------------------------------------------------------------------------------
tool.Equipped:Connect(function()
tool.Handle.Unsheath:Play()
local AnimTrack = tool.Parent:FindFirstChild("Humanoid").Animator:LoadAnimation(EquipAnim)
AnimTrack:AdjustSpeed(1)
AnimTrack:Play()
AnimTrack.Priority=Enum.AnimationPriority.Action3
task.wait(0.18)
Idle:Play()
end)
ok
tool.Activated:Connect(function(hit)
if not debounce then
debounce = true
task.wait(0.01)
Idle:Stop()
task.wait(0.01)
tool.Handle.SwordSlash:Play()
tool.Parent:FindFirstChild("Humanoid").Animator:LoadAnimation(Swing1):Play()
task.wait(0.80)
Idle:Play()
else
task.wait(0.01)
Idle:Stop()
task.wait(0.01)
tool.Handle.SwordLunge:Play()
tool.Parent:FindFirstChild("Humanoid").Animator:LoadAnimation(Swing2):Play()
task.wait(0.80)
Idle:Play()
end
script.Parent.Handle.Trail.Enabled = true
script.Parent.Handle.Trail.Lifetime = 0.4
script.Parent.Handle.Trail.Lifetime = 0
script.Parent.Handle.Trail.Enabled = false
task.wait(3)
debounce = false
end)
tool.Unequipped:Connect(function()
task.wait(0.02)
Idle:Stop()
end)
handle.Touched:Connect(function(part)
if part.Parent:FindFirstChild("Humanoid") and attacked == true and damaged == false then
damaged = true
part.Parent.Humanoid:TakeDamage(20)
end
end)
done
thats it?
oh
yh
would you like to donate to me
because i helped u so much and stuff
also come to me directly if u need more help
bc then i can charge ur ass

ill pay like 8 robux (all i got) if it works