How would you make a permanent debounce (that you can turn off by a gui mouseclick)

Hi there. I’ve never seen a devforum post about a debounce that actually saves (ontouch), so it’d be quite cool to figure out how debounces can work with a semi datastore.

The debounce should also be configurable (such as if you would like to reset stats, the debounce will disable.) The debounce will be spread across multiple checkpoints in the game, so when you reset stats it will need to reset all current debounces that are enabled.

Anyhow, if you have any good code for this, it’d be cool to figure out a full debounce system!

Thanks.

1 Like

You’re probably having trouble searching because you’re terminology is a bit off.

A “debounce” is always temporary – it removes the “bounce” in some signal so that instead of quickly alternating on/off before settling on one state, it switches once and stays there before being activated again (after some short time).

What is the actual problem that you’re trying to solve? Are you trying to make a checkpoint system that saves when the player leaves?

What I’m looking for is when the checkpoint is touched, an effect plays - which it works. However, the debounce only lasts for the server, and not permanently. If it’s not a debounce, what solutions are there?

You’d use DataStores to save & load the current Checkpoint a player is on, have you checked the API Reference?

I already have datastores for loading a player into a checkpoint, HOWEVER it still plays the effect.

Maybe you’re not checking if the Player’s Checkpoint value is equal to the previous value? (Or Checkpoint.Value - 1) & possibly cause you’re teleporting the player too quick, which could be resulting why the effect is still playing