So I am making a railway signalling system. It has to make sure that a value in a brick it is set to sensor equals 1. But one problem, how do I continue after "Stuff". I want so that it makes sure value called RETBToken inside a brick called "Stuff" inside a different model equals 1. I don't want it to be for only one train only, since I am doing the same system on multiple trains. The models of trains are going to be named the same, so no going thru workspace. Here is my script, fix it please.
print("WAZZAP") local debounce = false function onTouched(part) if debounce == false then if part.Name == "Stuff" RETBToken.Value == 1 then --Change this to the name of the correct part that trips the sensor end script.Parent.Touched:connect(onTouched)