Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

Can You Help Me Add A Debounce To This Tool?

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!

1 comment

0

You should include your attempt so we can figure out what you did wrong.

1 answer

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!

This discussion is preserved as it was. New answers, comments, and votes are closed.