Everytime i relaunch my game the questions always shuffle but when in-game it doesn’t (mainMenu.lua --> questions.lua --> gameOver.lua --> mainMenu.lua)
local M = { { question = "9 + 8", image = nil, answer = 2, answers = { "11", "17", "12", }, }, { question = "7 + 6", image = nil, answer = 3, answers = { "10", "12", "13", }, }, { question = "8 + 8", image = nil, answer = 2, answers = { "15", "16", "17", }, }, { question = "9 + 9", image = nil, answer = 3, answers = { "17", "19", "18", }, }, { question = "7 + 5", image = nil, answer = 1, answers = { "12", "16", "13", }, }, { question = "8 + 2", image = nil, answer = 3, answers = { "12", "14", "10", }, }, { question = "6 + 2", image = nil, answer = 2, answers = { "9", "8", "5", }, }, { question = "4 + 3", image = nil, answer = 2, answers = { "8", "7", "9", }, }, { question = "8 + 4", image = nil, answer = 3, answers = { "13", "11", "12", }, }, { question = "7 + 7", image = nil, answer = 1, answers = { "14", "10", "16", }, }, } local function shuffle(t) local rand = math.random for i = #t, 2, -1 do local j = rand(i) t[i], t[j] = t[j], t[i] end end shuffle(M) return M