Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Sword tool stops working after one use?

Asked by
trapiz 4
5 years ago

This is a regular script in a sword tool that does damage once but stops working after one use. Help is appreciated. Thanks.

01local Hitbox = script.Parent.Hitbox
02local CanDamage = script.Parent.LocalScript.CanDamage
03local CanTouch = true
04local CDDebounce = false
05 
06 
07script.Parent.Activated:Connect(function()
08    if CDDebounce == false then
09        CanDamage.Value = true
10 
11        delay(1.1, function()
12            CanDamage.Value = false
13            CDDebounce = true
14        end)
15    end
View all 41 lines...
1
any errors? SoftlockedUnderZero 668 — 5y
0
Nope, just doesn't work. trapiz 4 — 5y

Answer this question