local LCD = script.Parent.LCD
local Bottom = LCD.Display.Bottom
local Top = LCD.Display.Top
local LED = script.Parent.NetworkLED
local ValuesFolder = script.Parent.Parent.Parent.Values
local AlarmActiveValue = ValuesFolder.AlarmActive
local AlarmDisarmedValue = ValuesFolder.AlarmDisarmed
-- Add a new value to control loop termination
local ClearValue = ValuesFolder.Clear
AlarmActiveValue.Changed:Connect(function()
if AlarmActiveValue.Value then
Top.Text = " ALARM!"
-- Adjust LED colors based on the text value
if Top.Text == " ALARM!" then
while not ClearValue.Value do
LED.BrickColor = BrickColor.new("Bright red")
wait(0.5)
LED.BrickColor = BrickColor.new("Parsley green")
wait(0.5)
end
-- Reset LED color when loop is terminated
LED.BrickColor = BrickColor.new("Parsley green")
end
end
end)
-- Enbaled local script to display place name, date and time if alarm is in standby (cleared)
local OtherScript = script.Parent["time+date+placename"]
AlarmDisarmedValue.Changed:Connect(function()
if AlarmDisarmedValue.Value then
Top.Text = " DISARMED"
if Top.Text == " DISAMRED" then
ClearValue = true
wait(5)
Top.Text = ""
ClearValue = false
end
end
if AlarmDisarmedValue.Value or ClearValue.Value then
OtherScript.Enabled = true
end
end)
ClearValue.Changed:Connect(function()
if AlarmDisarmedValue.Value or ClearValue.Value then
OtherScript.Enabled = true
end
end)
So basically when ever I join the game, the UI on my keypad on the LCD dosen’t show up and I am not sure why. There are no errors in the output logs
I also have another script jsut for when nothing tirggers alarm shows date and time and palce name
local PlayerTime = os.date("*t", os.time())
local hour, min = PlayerTime.hour, PlayerTime.min
local Date = DateTime.now()
local LCD = script.Parent.LCD
local Bottom = LCD.Display.Bottom
local ValuesFolder = script.Parent.Parent.Parent.Values
local AlarmActiveValue = ValuesFolder.AlarmActive
local AlarmErrorValue = ValuesFolder.AlarmError
local AlarmTamperedValue = ValuesFolder.AlarmTampered
if AlarmActiveValue and AlarmTamperedValue and AlarmErrorValue == false then
Bottom.Text = Date:FormatLocalTime("LL", "en-us") .. ", " .. hour .. ":" .. min
end
-- place name printer screen
if AlarmActiveValue and AlarmErrorValue and AlarmTamperedValue == false then
local AlarmSettings = require(script.Parent.Parent.Parent.Configuration.AlarmSettings)
local Top = LCD.Display.Top
local PlaceName = AlarmSettings.Location_Settings.GameName
Top.Text = PlaceName
end
A couple of the strings here are not identical. I assume that this may be why it isn’t working?
Also, instead of spamming space to try and center things, there is a property of text objects (Textlabels and textbuttons, that allow you to set where the text is positioned (left, middle, right)
i got my script for a 1 month old ex-game i worked on till i re-opened a new ro-tech so it worked in th eold game not sure why it dosent owrk in the new game
Are you willing to provide the .rbxm file of it? (The UI + relevant scripts contained in a model), so that I can have a closer look to see if there is some other property that was neglected?