How can I make it so that I can hide the textlabel?

Hello!
Back with another issue.
Basically I am making a warning for when a reactor is overheating but when the temperature is below overheating I want to hide the text.
However I can’t figure a way to do that becuase if I try my way then it will hide the text even when the reactor goes below 499

Script (this is rushed 'cuz im running out of time)
local Temperature = workspace:WaitForChild("Values").Temperature

Temperature.Changed:Connect(function()
	if Temperature.Value > 4500 then
		script.Parent.BackgroundColor3 = Color3.fromRGB(223, 0, 0)
		script.Parent.TextColor3 = Color3.fromRGB(255, 255, 255)
		script.Parent.Text = "DANGER - REACTOR DEGRADATION POSSIBLE"
	elseif Temperature.Value > 3100 then
		script.Parent.BackgroundColor3 = Color3.fromRGB(221, 147, 0)
		script.Parent.TextColor3 = Color3.fromRGB(255, 255, 255)
		script.Parent.Text = "REACTOR CRITICAL - MINIMIZE PL INPUT"
	elseif Temperature.Value > 1954 then
		script.Parent.Visible = true
		script.Parent.BackgroundColor3 = Color3.fromRGB(212, 212, 0)
		script.Parent.TextColor3 = Color3.fromRGB(0, 0, 0)
		script.Parent.Text = "REACTOR OVERHEATING - ENGAGE COOLING SYSTEMS"
	elseif Temperature.Value < 500 then
		script.Parent.Visible = true
		script.Parent.BackgroundColor3 = Color3.fromRGB(0, 134, 218)
		script.Parent.TextColor3 = Color3.fromRGB(255, 255, 255)
		script.Parent.Text = "REACTOR STALL POSSIBLE - DISABLE COOLING SYSTEMS"
	end
end)

by the time i am posting this i am offline and im going to be online again tommorow 16:59 EST

script.Parent.Text.Visible = false

1 Like

You can use:

script.Parent.Visible = false

OR

script.Parent.TextTransparency = 1

Your second option only hides the background. The actual other method is this:

script.Parent.BackgroundTransparency = 1
script.Parent.TextTransparency = 1

Sadly it’s not gonna work becuase:

elseif Temperature.Value < 500 then

if i try and do this:

elseif Temperature.Value < 1954 then
script.Parent.Visible = false
end

then when the temperature is below 500, it will change color and text but it will still be hidden becuase you have something else checking if the temperature is bellow 1954 so that it can hide the overheating message so Visible will still be false.

1 Like

Try using:

script.Parent.Visible = false -- You can use has much has .Parent's so it will redirect to the Label. 

Quite simple, huh ?

1 Like

Then just change the visibility when the value is less than 500. Should be quite simple right?

1 Like

Just set the text to “” if you don’t want to hide the whole thing. Then when it changes text again, it will show it.

1 Like

The thing is if I try that then when the temp will be below 500 it will try to set Visible to true while at the same time to false.

1 Like