Is GenerateGUID fast and reliable?

Is using GenerateGUID fast enough to expect it to return a new GUID and not fail? I am using it to identify items spawned in the map and I want to be sure the is no noticeable delay and that GenerateGUID returns the GUID without yielding of failing.

I don’t know the underlying connection to the Roblox API and how these are generated so I was hoping someone else did.

Yep

local HttpService = game:GetService("HttpService")

local start = os.clock()

local storeGUIDS = {}
for i = 1, 10000 do
	storeGUIDS[i] = HttpService:GenerateGUID()
end

local endTime = os.clock()

print("Time elapsed: "..endTime-start.."seconds")
-- Time elapsed: 0.03130903400006 seconds
print(storeGUIDS) -- all your GUIDS

From this other post, there might be other better methods but yeah:

2 Likes

Very helpful response! Thank you. For some reason I hadn’t thought to just increment a serial number for object on the server, LOL