This isn't working

local alert = Instance.new("ScreenGui")(Alert)
local Alert = Instance.new("Frame")(AAlert)
local AAlert = Instance.new("TextLabel")
AAlert.Text = "Generator is being damaged"

or am I meant to do it like this

local text = game.StarterGui.Alert.TextLabel.BackgroundTransparency == 1