I am trying to make a live update board which changes to the last vehicle that passed through the sensor. Currently it saves to the value correctly but it does not know what is in the value's children. I need it to memorise the vehicle so when the destination on the vehicle updates, so does the board. Is there a way around this or can it not be done. Here is the code I got so far:
value = script.Parent.Value
gui = script.Parent.SurfaceGui.TextBox
function touched(eeeee)
if eeeee.Name == 'TRAINTRIGGER' then
value.Value = eeeee
end
end
script.Parent.Touched:Connect(touched)
while true do
gui.Text = script.Parent.Value.Value.destination.Value
wait()
end

4 comments
Yes by looping through it using a for loop.
How would you be able to do this?
Can you explain your question??
Basically, a train approaches a station and hits the sensor. It then displays the destination (traintrigger.destination.Value) on the board (gui). I need it to memorise the train so that if it train changes destination, such as in a terminus, the board will update too.