How to generate UID?

I want to generate a UID and want it so no two strings are ever the same.
I have read about GenerateGUID but I am not sure if they ever have the same string

what do you exactly mean no two strings are ever the same do you want all of them to be different from each other?

GenerateGUID doesn’t give the same string in the same server, but in different servers it can be made again.

Is it better to use math.randomseed or generateGUID?

GenerateGUID would be the better option because sometimes the random stuff isn’t exactly random and can generate the same String / number.

Bro just use HttpService:GenerateGUID. Its like extremely rare for it to be the same in any case.

From there (via Wikipedia), the odds of generating a duplicate GUID: 1 in 2^128 .

if you want it to perm prevent from getting the same string then here

local HttpService = game:GetService("HttpService")
local result1 = HttpService:GenerateGUID(true)
local result2
repeat wait() result2 = HttpService:GenerateGUID(true) until result2 ~= result1
if result2 ~= result1 then
-- code
end

What? no! the two guids will never be the same. if they manage to be the same, you should speak to guiness world records.

So is it like GenerateGUID never gets the same string in the same server, and math.randomseed sometimes gets it on the same server?

i just showed him an example of what he wanted.

Youre not understanding. GUIDs are not dependent on the server. You will never see two GUIDs being the same

Is Roblox’s UUID (GenerateGUID) system actually gaurenteed unique? - Help and Feedback / Scripting Support - DevForum | Roblox

This post actually states that wrong

You will legit never have to worry about them being the same because you are more likely to be hit by a metor than having two guids being the same. you do not have to implement code to insure that they are different.

sometimes you can get really unlucky

noo bro this is like a 0.0000000001% chance bro :sob::sob: if you spend a year generating 1000 guids a millisecond u will most likely not see one guid that is the same

There are 32 hex digits in a GUID, that is a 1 in 340282366920938463463374607431768211456 chance of a collision, which means for all intents and purposes, it will not happen

I am not sure that you understand probability. In the event that two GUIDs are the same roblox should be the least of your concerns, since you are now the luckiest human to ever exist. ever.

I still do not want to take a risk.

Let me clarify a bit more, I am trying to make a global shop and when a player sells an item, it will send to all server a UID, so the 1 in 103 trillion chance is more likely to occur

alr then you can try my code above.