Should I use retries if loading data fails, or kick the player instead?

Basically, I have a datastore and it has pcall retry logic. Meaning if one setasync request fails, it repeats requests until it succeeds.

I was thinking about also doing the same thing for getasync but I instead decided to just kick the player if the request fails, the getasync function is still wrapped in a pcall but I think saving is more important than loading.

With loading data, getasync can fail however I can just kick the player and eventually when they rejoin their data will be loaded in.

Rather than spamming requests because obviously I should also minimize how many times i’m using up data.

So should I kick the player if their data fails to load, or instead do retries if it fails to load?

I’d recommend you just retry it a few times, and instead of kicking the player, just teleport them to the same game but to a different server, so the player doesn’t lose interest in the game if data loading fails.

1 Like

Yeah I think that may be a good idea, the reason i’m not really on board with retrying loading data is because I think I should preserve how much data i’m using up. And when there is a way to avoid using up data I should take it.

1 Like