#what is a heartbeat debounce

18 messages · Page 1 of 1 (latest)

ashen matrix
#

i've seen that term passed around in devforum and among my other friends but i cant actually find anything about it.

median bloom
#

That is not an official term

#

"Debounce" alone is, though

#

A debounce is a mechanism that regulates how often a function can be performed

#

It's essentially a cooldown

ashen matrix
hybrid barnBOT
#

studio** You are now Level 4! **studio

ashen matrix
#

my friend gave me something

#
local rate = 1
local last = 0

local fire
fire = runservice.Heartbeat:Connect(function(dt)
  last += dt
  if last >= rate then
    last -= rate
  end
end)
#

this is what he means by that

ashen matrix
median bloom
ashen matrix
#

thank you

median bloom
ashen matrix
#

wait

#

i mistyped it

#

sorry that was supposed to be last -= rate