If you don’t understand what I mean, refer to the image below:
What I want:
What I got:
So I want to separate these Jobs into their own group, I tried using a table to separate but I don’t know where to start with this.
local jobsModule = {
["Scavenger"] ={
["Title"] = "Scavenger",
["Type"] = "Unemployed",
["Icon"] = "rbxassetid://",
["ReqGamepass"] = false,
["PlayerCount"] = nil
}
}
return jobsModule
local function addJobs()
for jobName, jobData in pairs(jobsModule) do
print("Job Name:", jobName.Name)
local templateButton = jobsSelectFrame.ExampleJob:Clone()
local newJobButton = templateButton:Clone()
if jobData.Type == "Government" then
newJobButton.BackgroundColor3 = Color3.fromRGB(128, 141, 158)
end
newJobButton.Name = jobName
newJobButton.Title.Text = jobData.Title
newJobButton.Icon.Image = jobData.Icon
newJobButton.Visible = true
newJobButton.Parent = jobsSelectFrame
end
end
So how do you think I should do this?