Hi, I'm making a module that contains tips for certain places. Ignore the places and tips, it's a meme game.
As I was assembling the main module I thought:
"How I can choose a random place between all of them in the tips table, and assign it to a text button in the GUI that lets you select the place?"
Here's what I have so far, it's not complete yet but I'd like a bit of help to finish it
local tips = {
["Arizona"] = {
"Beware the sunstroke debuff. Try to alleviate it before your health reaches 0",
"Flipflops are inconvenient to wear here, they will hinder your movement",
"",
}
}
function tipDisplay(name, place)
local randomTip = tips[math.random(1, #tips[place])]
local randomPlace = tips[math.random(1, #place)]
end
return tips
The image attached is the gui that lists the selectable places
any help is appreciated, thank you in advance