"Attempt to call to a nil value"

I’m relatively new to scripting on Roblox, and I’m trying to add a value to a list, but when I do it returns “ReplicatedFirst.LocalScript:7: attempt to call to a nil value”

I’m not exactly sure why it’s causing an error, here’s the code:

local randomKey
local keys = {}
local numberOfKeys = 0

game.Players.LocalPlayer.PlayerGui:WaitForChild("ScreenGui").Start.MouseButton1Click:Connect(function()
    randomKey = math.random(26)
    keys.insert(randomKey + 96)
    numberOfKeys += 1
    print(keys)
end)

What does your explorer look like?
Can you please send a SS of it?

Oh wait the error might be this:

keys.insert(randomKey + 96)

Try replacing it with this:

table.insert(keys, randomKey + 96)

Instead of keys.insert use table.insert(keys, etc...).