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

How do I stop this from repeating damage? This Is a tool Btw [closed]

Asked by 3 years ago
cd = false  

anim = script.Parent.Parent.Humanoid:LoadAnimation(script.Parent.Animation)

script.Parent.Activated:Connect(function()
    if cd == false then

    print("OVERDRIVE")
        script.Parent.OverDrive.Playing = true
        cd = true
        anim:Play()
        script.Parent.Parent.HumanoidRootPart.Anchored = true
        script.Parent.Parent.HumanoidRootPart.Touched:Connect(function(touch)
            if touch.Parent:FindFirstChild("Humanoid") then


                    touch.Parent.Humanoid:TakeDamage(30)






            end
        end)


        wait(6)
        script.Parent.Parent.HumanoidRootPart.Anchored = false
        cd = false

        end
end)

Closed as Not Constructive by JesseSong

This question has been closed because it is not constructive to others or the asker. Most commonly, questions that are requests with no attempt from the asker to solve their problem will fall into this category.

Why was this question closed?