Hey hey! I'm back! This time, I decided to bring a piece of code along with me. Every time this code is executed, it does it in order, although it looks like it would run otherwise. What should I change in order to make it more random?
local bulb = script.Parent
function onClick(player)
if pl##################################################hen
local iclone = bulb:FindFirstChild("IdeaScreen"):clone()
iclone.Parent = player.PlayerGui
end
local ideaui = player.PlayerGui:FindFirstChild("IdeaScreen")
local flow = math.random(1,6)
if flow == 1 then
ideaui.Frame.IdeaText.Text = action[math.random(1, #action)].." "..afteractionnoun[math.random(1, #afteractionnoun)]
elseif flow == 2 then
ideaui.Frame.IdeaText.Text = action[math.random(1, #action)].." "..afteractionnoun[math.random(1, #afteractionnoun)].." "..clickbait[math.random(1, #clickbait)]
elseif flow == 3 then
ideaui.Frame.IdeaText.Text = adjective[math.random(1, #adjective)].." "..genericnoun[math.random(1, #genericnoun)].." "..title[math.random(1, #title)]
elseif flow == 4 then
ideaui.Frame.IdeaText.Text = adjective[math.random(1, #adjective)].." "..propernoun[math.random(1, #propernoun)].." "..title[math.random(1, #title)]
elseif flow == 5 then
ideaui.Frame.IdeaText.Text = propernoun[math.random(1, #propernoun)].." "..title[math.random(1, #title)]
elseif flow == 6 then
ideaui.Frame.IdeaText.Text = genericnoun[math.random(1, #genericnoun)].." "..title[math.random(1, #title)]
end
end
bulb.ClickDetector.MouseClick:connect(onClick)
|