currentTemp=game.Workspace:WaitForChild("TemperatureValue")
AlarmMinorS=game.Workspace.AlarmMinor
AlarmMajorS=game.Workspace.AlarmMajor
MainframeStatus=game.Workspace.MainframeStatus.SurfaceGui.TextLabel
function alarmMinor()
if currentTemp.Value >= 700 then
AlarmMinorS:Play()
AlarmMajorS:Stop()
--
MainframeStatus.Text = "LavaBlast://Core_Status/Issue"
MainframeStatus.TextColor3 = Color3.new(255, 85, 0)
--
local firethree = workspace.Mainframe_Status_Fire_Parts:GetChildren()
for i = 1, #firethree do
firethree[i].Fire.Enabled = false
--
local mainframelights = workspace.MainframeLights:GetChildren()
for i = 1, #mainframelights do
mainframelights[i].Light.PointLight.Color = Color3.new(1, 170/255, 0)
mainframelights[i].Light.PointLight.Color = Color3.new(255, 170/255, 0)
mainframelights[i].Light.BrickColor = BrickColor.new("Orange")
end
end
end
function alarmMajor()
if currentTemp.Value >= 1000 then
AlarmMajorS:Play()
AlarmMinorS:Stop()
--
local emergencylightson = workspace.EmergencyLights:GetChildren()
for i = 1, #emergencylightson do
emergencylightson[i].Toggle.Enabled = true
--
MainframeStatus.Text = "LavaBlast://Core_Status/Major"
MainframeStatus.TextColor3 = Color3.new(255, 0, 0)
--
local fireone = workspace.Mainframe_Status_Fire_Parts:GetChildren()
for i = 1, #fireone do
fireone[i].Fire.Enabled = true
--
local mainframelightstwo = workspace.MainframeLights:GetChildren()
for i = 1, #mainframelightstwo do
mainframelightstwo[i].Light.PointLight.Color = Color3.new(1, 0, 0)
mainframelightstwo[i].Light.PointLight.Color = Color3.new(1, 0, 0)
mainframelightstwo[i].Light.BrickColor = BrickColor.new("Red")
end
end
end
function normalTemperature()
if currentTemp.Value < 699 then
AlarmMinorS:Stop()
AlarmMajorS:Stop()
MainframeStatus.Text = "LavaBlast://Core_Status/Stable"
MainframeStatus.TextColor3 = Color3.new(255, 255, 255)
local fireone = workspace.Mainframe_Status_Fire_Parts:GetChildren()
for i = 1, #fireone do
fireone[i].Fire.Enabled = false
--
local mainframelightsthree = workspace.MainframeLights:GetChildren()
for i = 1, #mainframelightsthree do
mainframelightsthree[i].Light.PointLight.Color = Color3.new(255, 255, 255)
mainframelightsthree[i].Light.PointLight.Color = Color3.new(255, 255, 255)
mainframelightsthree[i].Light.BrickColor = BrickColor.new("White")
end
end
end
end
end
end
end
while true do
wait(5)
print "lol"
normalTemperature()
alarmMinor()
alarmMajor()
end
And this is the error:
21:10:17.277 - Workspace.Meltdown Detector:79: attempt to call global 'normalTemperature' (a nil value)
21:10:17.277 - Stack Begin
21:10:17.277 - Script 'Workspace.Meltdown Detector', Line 79
21:10:17.278 - Stack End
-- Also line 79 is "normalTemperature()"
I don't know what is wrong. Please help asap! :)

1 comment
Can you give us the full script? It looks like either normalTemperature, alarmMinor, or alarmMajor is not defined.