So I want this poster to change words. There are 8 adjectives and 8 nouns. Each variable before the mousebutton1click function starts looks like this
adjective1 = script.Parent.Parent.Base.youare.Adjectives.Frame.chaotic
adjective2 = script.Parent.Parent.Base.youare.Adjectives.Frame.fancy
adjective3 = script.Parent.Parent.Base.youare.Adjectives.Frame.fierce
adjective4 = script.Parent.Parent.Base.youare.Adjectives.Frame.majestic
adjective5 = script.Parent.Parent.Base.youare.Adjectives.Frame.powerful
adjective6 = script.Parent.Parent.Base.youare.Adjectives.Frame.stunning
adjective7 = script.Parent.Parent.Base.youare.Adjectives.Frame.unique
adjective8 = script.Parent.Parent.Base.youare.Adjectives.Frame.wholesome
noun1 = script.Parent.Parent.Base.youare.Nouns.Frame.cat
noun2 = script.Parent.Parent.Base.youare.Nouns.Frame.eagle
noun3 = script.Parent.Parent.Base.youare.Nouns.Frame.flower
noun4 = script.Parent.Parent.Base.youare.Nouns.Frame.human
noun5 = script.Parent.Parent.Base.youare.Nouns.Frame.lion
noun6 = script.Parent.Parent.Base.youare.Nouns.Frame.mountian
noun7 = script.Parent.Parent.Base.youare.Nouns.Frame.potato
noun8 = script.Parent.Parent.Base.youare.Nouns.Frame.tree
Now I could have made a table, but i didnt feel like it. Now when you do math.random it would choose a number 1,8. The number it gets would be one adjective, and I would make another variable in the function and it would give me one noun. I have not completed the script but please tell me how i would do this.
script.Parent.MouseButton1Click:Connect(function()
local adjective = math.random(1,8)
local noun = math.random(1,8)
if adjective == 1 then
adjective1.TextColor3 = Color3.new(255,255,255)
adjective1.TextStrokeColor3 = Color3.new(255,255,255)
or adjective == 2 do
adjective2.TextColor3 = Color3.new(255,255,255)
adjective2.TextStrokeColor3 = Color3.new(255,255,255)
end
end
end)

2 comments
for this wouldent it be easier just to do "script.Parent.Parent.Base.youare.Adjectives.Frame:GetChildren" since they are all children of the frame?
if i did that i dont think i could make the vars and choose