I am sure that what I have done here is obvious to many people, however I can’t seem to spot it:
In the section of code shown below, the code jumps straight to the first elseif and does that condition, even though it doesn’t actually match any of those conditions, it should be matching the first one
while true do
wait (1)
if workspace.CoreSystem.CoreStatus == "OFFLINE" then
script.Parent.Text = "Facility is currently using Main Generator Power"
elseif workspace.CoreSystem.CoreStatus == "Stable" or "Too Cold" or "Overheating" or "Critical" then
wait (2)
script.Parent.Text = "Facility is currently using Reactor Core Power"
elseif workspace.CoreSystem.CoreStatus == "Startup" or "Igniting" or "Unstable" then
script.Parent.Text = "Facility is currently switching power."
elseif workspace.CoreSystem.CoreStatus == "Near Meltdown" or "Meltdown" or "Override Expired" or "Polarized" or "Freezedown" or "Shutdown Failed" then
script.Parent.Text = "Facility is currently using ????? Power"
elseif workspace.CoreSystem.CoreStatus == "Shutdown" then
script.Parent.Text = "Facility currently has no power."
else
script.Parent.Text = "Facility is currently using ????? Power"
end
end
If anyone has any ideas or needs more info do ask.
Thanks
while true do
wait (1)
if workspace.CoreSystem.CoreStatus == "OFFLINE" then
script.Parent.Text = "Facility is currently using Main Generator Power"
else
if workspace.CoreSystem.CoreStatus == "Stable" or "Too Cold" or "Overheating" or "Critical" then
wait (2)
script.Parent.Text = "Facility is currently using Reactor Core Power"
else
if workspace.CoreSystem.CoreStatus == "Startup" or "Igniting" or "Unstable" then
script.Parent.Text = "Facility is currently switching power."
else
if workspace.CoreSystem.CoreStatus == "Near Meltdown" or "Meltdown" or "Override Expired" or "Polarized" or "Freezedown" or "Shutdown Failed" then
script.Parent.Text = "Facility is currently using ????? Power"
else
if workspace.CoreSystem.CoreStatus == "Shutdown" then
script.Parent.Text = "Facility currently has no power."
else
script.Parent.Text = "Facility is currently using ????? Power"
end
end
end
end
end
end
I didn’t meant like that
This is was what i wanted
while true do
wait (1)
if workspace.CoreSystem.CoreStatus == "OFFLINE" then
script.Parent.Text = "Facility is currently using Main Generator Power"
if workspace.CoreSystem.CoreStatus == "Stable" or "Too Cold" or "Overheating" or "Critical" then
wait (2)
script.Parent.Text = "Facility is currently using Reactor Core Power"
if workspace.CoreSystem.CoreStatus == "Startup" or "Igniting" or "Unstable" then
script.Parent.Text = "Facility is currently switching power."
if workspace.CoreSystem.CoreStatus == "Near Meltdown" or "Meltdown" or "Override Expired" or "Polarized" or "Freezedown" or "Shutdown Failed" then
script.Parent.Text = "Facility is currently using ????? Power"
if workspace.CoreSystem.CoreStatus == "Shutdown" then
script.Parent.Text = "Facility currently has no power."
script.Parent.Text = "Facility is currently using ????? Power"
end
end
end
end
end
end