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

Why does damage keeps stacking up?

Asked by 8 years ago
local function Harm(Target)
    if Target.Parent:FindFirstChild("Humanoid") and Target.Parent.Name ~= Player.Name and Debounce == true and Anima.IsPlaying == true then

                Debounce = false
            Target.Parent.Humanoid:TakeDamage(Damage)

        end
    end
Player.Character.Sword.Blade.Touched:connect(Harm)

I have that piece of code that won't let the player get damaged unless the animation is playing but each time I click and the blade doesn't hit anyone the damage stacks up, for example the default damage is 200 but if I click twice without hitting someone it'll be 400 and so on, how can I fix this?

0
Is there anywhere outside of this script that you're performing arithmetic on the damage amount? Pyrondon 2089 — 8y
0
Yeah Damage = Level * 0.5 - Only that nothing else. Slazerick 55 — 8y

Answer this question