I am trying to create a function to generate a randomised key. When it gets into the loop to generate the key, it skips over the loop, any prints, and breakpoints.
local validChars = string.split("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", '')
-- Generate a promise
local function GeneratePromise(object): string
if object.ClassName ~= "Model" then
local promise = ""
for _ = 0, 16, 1 do
promise += validChars[math.random(1, #validChars + 1)]
end
promises[promise] = object
print("HERE!")
print(promise)
return promise
end
end
return GeneratePromise(model)
Maybe Iām being stupid, but I cannot see what the problem is.