DebounceLib - create debounces for events easily

Introduction

Does it take too long to create debounces? Do you need to reuse them throughout Scripts? Fret not, DebounceLib is for you!

Installation

See here for installation methods, or just take the Model:

Roblox-ts version

There’s now a rbxts package for DebounceLib! See here:

Same class and methods, just ported:

import DebounceLib from '@rbxts/debouncelib';
// Or
import { DebounceLib } from '@rbxts/debouncelib'; 

const Lib = new DebounceLib();

// Lib.createEvent etc

Documentation

See here for the docs:
https://debouncelib.sebi210.com/

Bugs? Contributions? Suggestions?

Submit an issue/pull request on the repo or reply to this topic!

Credits

@ReturnedTrue - Most of the library, docs customisation
@sebi210 - Debounce methods, docs hosting
MkDocs Team - docs software

6 Likes

Hello,
On debouncelib website-api-reference i gotta connect time out

also
Website says
If you’re the owner of this website:
Contact your hosting provider letting them know your web server is not completing requests. An Error 522 means that the request was able to connect to your web server, but that the request didn’t finish. The most likely cause is that something on your server is hogging resources. Additional troubleshooting information here

The DNS is pretty new and has had some issues. It seems to work better with Chromium based browsers, try to use one if you’re not already.

1 Like

No issues for me on Tor, Firefox, Vivaldi, Edge or Chrome.

Hello, sorry for the inconvenience!

As Return said, the DNS is pretty new, so it might take a while to ‘run around the world’.

Anyways, I have done some testing, and it worked for me everywhere.

And you can see Railworks2 did some testing too. The website should be fully running and functional!

If you’re having same issue as static2240. I guess all you can do for now is wait a while. I’ve made sure everything is properly configured.

I got that first time I tried too. Just refresh and it should work fine.

@ReturnedTrue what is the point of the init function? Why have you chosen this over just require()ing the module and using a standard constructor, such as .new(), for each new debounce?

Yeaa i try it 3 times and still didn’t work.
as sebi210 say i just have to wait.
Also im using Opera

All the events use the Folder passed in init, it’s just best to store that for later use rather than unnecessarily passing it everytime.

Hi @ReturnedTrue!

Thank you for sharing this resource, it is very interesting.

Would you kindly create a link to Source code (preferably Github and/or Pastebin) for people who want to read the source but don’t have any access to a PC or maybe want to contribute to the source

There is link to the GitHub page in the OP.

Anyways, it’s here.