I'm trying to make a SurfaceGUI with a GUI, which are linked, you press a button in the gui which changes a value, That works.
What I'm trying to do now is have the surface gui display one of two phases. Custom Messages, or looped messages.
local nextMsg = 20
local titles = { --Titles
"Need Help?";
"REMEMBER:";
"REMEMBER:";
}
local title = script.Parent.Title
local cont = script.Parent.Content
local content = { --The content
"Use the 911 callbox to get help!";
"Stick to the speed limit! People are trying not to get hurt!";
"Trespassing is a crime! Trespassing on other's properties will get you arrested!";
}
math.randomseed(os.time())
local emergency = workspace.CMessages.Value
while wait() do
if emergency == false then
for i, r in ipairs(titles) do
title.Text = titles[i];
cont.Text = content[i];
wait(nextMsg)
end
elseif emergency == true then
title.Text = "Park Emergency"
cont.Text = game.Workspace.CMessages.EMessage.Value
end
end
The question for those who don't understand
How do I get this to work, because when I change the value to true, it changes, but when I change it to false, it doesn't go back to the looping. Why?

2 comments
So, what exactly do you need help with? Your question is kind of confusing.
Don't use elseif for that! USE ELSE!