Hey, I am trying to do a script that will search in the module script and if the requirement is true. It will create a button and the text on the button will be the name of the table. But, when I try to get the name of the table like below. It returns a table, I need help.
the script:
local M = require(game.ServerScriptService.Module)
for _,v in pairs(M) do
if M.Requirement == true then
local B = Instance.new("TextButton")
B.Parent = game.StarterGui
B.Text = v
end
end
the Module:
local Module = {}
Module.Yes = {
Requirement = true
Info = "Yes sir"
}
return Module