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

What is a denounce? [closed]

Asked by 10 years ago

I've heard people talking about it but don't get the concept or what it means/does.

0
Sorry denounce is the right word. ScriptNHelper 5 — 10y

Locked by evaera

This question has been locked to preserve its current state and prevent spam and unwanted comments and answers.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Azarth 3141 Moderation Voter Community Moderator
10 years ago

A debounce is just what people call a bool to stop something from firing a bunch of times or to keep people from doing something until after a certain amount of time. A 'debounce' can be called anything.

local db = true -- can be named anything
script.Parent.Touched:connect(function(hit)
    if hit.Parent and hit.Parent:findFirstChild("Humanoid") and db then -- checking to see if db is true,   then setting it to false if it is, then adding a small wait() at the end will keep the script from spamming instance(below)
        db = false
        Instance.new("Part", Workspace).Name = "NoSpam"
        wait(1)
        db = true
    end
end)
Ad