Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Debounce not working?

coroutine.resume(coroutine.create(function()
local t = false
while wait() do 
wait()
if down == true then
repeat wait() until down == false 
stik2 = stik:Clone()
stik2.Parent = game.Workspace
stik2:BreakJoints()
stik.Transparency = 1
stik2.CFrame = CFrame.new(stik.Position)
stik2.Touched:connect(function(hit)
if hit then
vol:Destroy()
hum = hit.Parent:findFirstChild("Humanoid")
if hum and hit.Parent.Name ~= plyr.Name then
if t == false then
t = true
hum:TakeDamage(99)
t = false
end
end
end
end)

t is the debounce, i want it to do 99 damage, but it just kills.

1 answer

coroutine.resume(coroutine.create(function() 
local t = false 
while wait() do 
wait() 
if down == true then 
repeat wait() until down == false 
stik2 = stik:Clone() 
stik2.Parent = game.Workspace 
stik2:BreakJoints() 
stik.Transparency = 1 
stik2.CFrame = CFrame.new(stik.Position) 
stik2.Touched:connect(function(hit) 
if hit then 
vol:Destroy() 
hum = hit.Parent:findFirstChild("Humanoid") 
if hum and hit.Parent.Name ~= plyr.Name then 
if t == true then return end 
t = true 
hum:TakeDamage(99) 
t = false 
end  
end 
end 
end) 

Try this

1 comment

0

No it didnt work.

This discussion is preserved as it was. New answers, comments, and votes are closed.