#How to split a string to its numbers
1 messages · Page 1 of 1 (latest)
local splitted = string.split("12s", "s");
will return an array that will look like this:
{
[1] = "12";
[2] = "";
};
so you just try to get the number from the first index
local Number = tonumber(splitted[1])
if not Number ...
string.gsub, string.sub, string.match, string.gmatch, there are many ways