#Properly using debounce

1 messages · Page 1 of 1 (latest)

low bobcat
#

I'm not sure if the problem is me debouncing or something but my UpdateLogs() function keeps running repeatidly and so is making my remote event fire way too many times can someone help me figure out a way to prevent this? Code provided in the screenshot.

deep oxide
#
  1. You should not loop UpdateLog(), you're connecting a connection every frame, that's gonna have serious lag issues. Just loop and connect the functions once
#
  1. Your db check should be in the function, as in, if db then return end
#
  1. Also thought I'd just let you know that task.wait() is better than wait(), I forgot the reason but might be performancd
low bobcat
#

DANG IMA HAVE TO CHANGE SO MUCH 😭😭😭 thanks doe ill work on it as soon as i get back from my walk anything else you add ill also look at when im back

low bobcat
#

What you suggest I use instead of .OnServerEvent doe?

deep oxide
#

You see how its inside the PlayerAdded function?

#

Just copy the OnServerEvent and move it outside of that function