I'm trying to detect when any part named "SignalSensor" within the folder is hit and then change a value that is kept inside the parent of the SignalSensor part.
I thought maybe adding the sensors to a table but I've hit a dead end with what to do next. Thanks
sensors = {}
local desc = script.Parent:GetDescendants()
for index, desc in pairs(desc) do
if desc.Name == "SignalSensor" then
table.insert(sensors, desc)
warn("Signal Added To Table")
print(sensors)
end
end
The goal is to detect which sensor is hit and then do something similar to this
hitSensor.Parent.SignalValues.TrainInBlock.Value = true

3 comments
What do you mean by "Hit"? Like touched? If so, just use the .Touched event
Yes I do mean touched. How would I use Touched with multiple parts? Would I use the table name or something?
doesn't matter anymore; i've found a way to do it locally instead