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

Can You Help Me Add A Debounce To This Tool? [closed]

Asked by
iWasThisi -15
4 years ago

Ive Tried To Add It But It Didn't Work, Here Is The Tools Script,

script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr)

local Strength = game.Players[script.Parent.Parent.Name].leaderstats.Strength
    Strength.Value = Strength.Value +1000   *plr.leaderstats.Life.Value
end)

Thanks For Your Help. Reminder I tried so don't Flag It. Thanks For All Your Help!

0
You should include your attempt so we can figure out what you did wrong. DesertusX 435 — 4y

Closed as Not Constructive by youtubemasterWOW

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?

1 answer

Log in to vote
0
Answered by 4 years ago

Since you said you wanted your tool to add strength to your players value, you can do something like this:

local db = true
local Strength = game.Players[script.Parent.Parent.Name].leaderstats.Strength
script.Parent.RemoteEvent.OnServerEvent:Connect(function(plr)
    if db == true then
        Strength.Value = Strength.Value +1000   *plr.leaderstats.Life.Value
        db = false
        wait(3) --//CoolDown Time
        db = true
    end
end)

That should work!

Ad