UI not showing up

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

2 Likes

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

image
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)

1 Like

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

This is so confusing, I am so confusded

Right, I am going to re-code the entire script and get back to you

@PoppyandNeivaarecute
I have identifyed an issue, it enables a script tha tis already enabled so I need to disable the script lol.

@PoppyandNeivaarecute
I did the aligment to center and did everyhting but the UI still dosent do a thing

2 Likes

POST TERMINATED: NO RESULTS FIXING THE ISSUES EVEN AI BOTS CAN’T FIX IT bruh

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?

i have somone working on it for me

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.