So this script is supposed to look at the text of 2 GUIs, and then make certain GUIs visible based on what they say. I added the Medium option for Building and Comedy, and suddenly the entire script won't work. Can you please help me? Here is my script, sorry it is a little long... Also all my hierachies are correct.
wait(1)
player = game.Players.LocalPlayer
gui = player.PlayerGui.ScreenGui
results = gui.results
stepone = results.step1choice
steptwo = results.step2choice
TMM = results.TMM
LD = results.LD
AFSS = results.AFSS
AR = results.AR
NDS = results.NDS
TQ = results.TQ
SBS = results.SBS
S = results.S
WTRB = results.WTRB
PIR = results.PIR
HITW = results.HITW
DI = results.DI
BB2 = results.BB2
PTP = results.PTP
D2 = results.D2
Loading = results.Loading
results.Changed:connect(function()
local value = results.Visible
wait(1)
Loading.Visible = true
wait(3)
if stepone.Text== "Action & Adventure" then
if steptwo.Text== "Easy" then
local num = math.random(1,2)
if num== 1 then
TMM.Visible = true
Loading.Visible = false
elseif num==2 then
LD.Visible = true
Loading.Visible = false
end
elseif steptwo.Text== ("Medium") then
local num = math.random(1,4)
if num==1 then
AR.Visible = true
Loading.Visible = false
elseif num==2 then
AFSS.Visible = true
Loading.Visible = false
elseif num==3 then
NDS.Visible = true
Loading.Visible = false
elseif num==4 then
TQ.Visible = true
Loading.Visible = false
end
end
elseif stepone.Text == ("Building & Comedy") then
if steptwo.Text == ("Easy") then
local num = math.random(1,7)
if num== 1 then
SBS.Visible = true
Loading.Visible = false
elseif num==2 then
S.Visible = true
Loading.Visible = false
elseif num==3 then
WTRB.Visible = true
Loading.Visible = false
elseif num==4 then
PIR.Visible = true
Loading.Visible = false
elseif num==5 then
HITW.Visible = true
Loading.Visible = false
elseif num==6 then
DI.Visible = true
Loading.Visible = false
elseif num==7 then
BB2.Visible = true
Loading.Visible = false
end
elseif steptwo.Text == ("Medium") then
local num=math.random(1,2)
if num == 1 then
PTP.Visible = true
Loading.Visible = false
elseif num==2 then
D2.Visible = true
Loading.Visible = false
end
end
end
end)

1 comment
Please include the output if there is any.