How do i detect name order with numbers?

Hello, i created an event password system where i can fire the event if my password is correct, all passwords are made in base of HttpService:GenerateGUID(), they aslo update every 20 seconds, so i decided to create a number order for them, so i dont need to update all my codes to login into the events. The problem is, i don’t know how to detect the numbers (numbers does not updates), i’ve tried using :lower() but it only works for strings as i remember.

This is the part from my code:

coroutine.wrap(function()
	while (IsAble) do -- IsAble is a variable (currently "true")
		wait(20)
		for i,v in ipairs(MainTable) do -- I store all my events in tables.
			v.Name = i .. HttpService:GenerateGUID() -- I generate the password.
			v.Parent = EventPasswords -- Just the parent
		end
	end
end)()

And this should look something like this: https://gyazo.com/b876a02c77b6c50b7e9277b887c59615

Is there any way to detect numbers like :lower() function?

Do you mean you want to detect everything before the open bracket?

image

As in, the 1 before the {

Basically i just want to detect the number, the rest will be converted into the password of the event, so i basically want to convert the number, like if Event:lower() == 1 then

local splitID = string.split((v.Name, "{"))
local num = splitID[1]

I think this would give you the number before the bracket.

1 Like
coroutine.wrap(function()
	while (IsAble) do -- IsAble is a variable (currently "true")
		wait(20)
		for i,v in ipairs(MainTable) do -- I store all my events in tables.
			v.Name = string.match(v.Name, "%d") .. HttpService:GenerateGUID() -- I generate the password.
			v.Parent = EventPasswords -- Just the parent
		end
	end
end)()
1 Like

Thank you, this is something like i wanted to do!