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.
#Properly using debounce
1 messages · Page 1 of 1 (latest)
- You shouldn't listen to .OnServerEvent in a Player Function, that will memory leak if there is more than 1 player. Move it outside on its own
- 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
- Your db check should be in the function, as in,
if db then return end
- Also thought I'd just let you know that
task.wait()is better thanwait(), I forgot the reason but might be performancd
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
Alright
What you suggest I use instead of .OnServerEvent doe?
No its correct but
You see how its inside the PlayerAdded function?
Just copy the OnServerEvent and move it outside of that function