if script.Parent.Parent.LineBox.Text == "1" then -- if line 1
for _v in pairs(game.Workspace:GetChildren()) do
if v.Name:find("DeparturesBoard") then
if script.Parent.Parent.LineBox.Text == "1" then
local DB = game.Workspace.DeparturesBoard
local F1 = DB.Screen.InfoFrame.F1
F1.Visible = true
F1.FlightNumber.Text = script.Parent.Parent.FlightNumberBox.Text
F1.Destination.Text = script.Parent.Parent.DestBox.Text
F1####e#Text = script.Parent.Parent.GateBox.Text
F1.Time.Text = script.Parent.Parent.TimeBox.Text
F1.Status.Text = script.Parent.Parent.StatusBox.Text
end
end
end if script.Parent.Parent.LineBox.Text == "1" then -- if line 1
for _v in pairs(game.Workspace:GetChildren()) do
if v.Name:find("DeparturesBoard") then
if script.Parent.Parent.LineBox.Text == "1" then
local DB = game.Workspace.DeparturesBoard
local F1 = DB.Screen.InfoFrame.F1
F1.Visible = true
F1.FlightNumber.Text = script.Parent.Parent.FlightNumberBox.Text
F1.Destination.Text = script.Parent.Parent.DestBox.Text
F1####e#Text = script.Parent.Parent.GateBox.Text
F1.Time.Text = script.Parent.Parent.TimeBox.Text
F1.Status.Text = script.Parent.Parent.StatusBox.Text
end
end
end
---
After script that, when I execute the script, it calls 'v' a nil value, the 2nd one, where it says: "if v.Name:find("DeparturesBoard") then" and doesn't work. How can I fix this?
|