How can I make a global ID

Think of this as a UserId for a player, a global ID and with each creation of an item, that ID increases.
My main issue with this is making it work across lots of different servers, as I would need to get the current ID, add 1, then save the ID, and hope another server didnt do it at the exact time.

Sounds tedious, are there any work arounds? I looked at some old posts but I dont think I understood them very well

Can you explain more? This seems like quite an interesting issue but I don’t understand what you really mean.

Can’t you just use HttpService:GenerateGUID(false) for a unique random ID?

Then assign it to the player and keep it using datastores?

That creates a unique random ID??? Why did nobody tell me this.
Ill check it out!

Yes.

As the documentation states:
The GenerateGUID function randomly creates a universally unique identifier (UUID) string.

The sixteen octets of a UUID are represented as 32 hexadecimal (base 16) digits, displayed in 5 groups separated by hyphens in the form 8-4-4-4-12 for a total of 36 characters. For example: 123e4567-e89b-12d3-a456-426655440000.
1 Like