Hello, there is a table in my script, but it doesn’t seem to work. The output doesn’t print any errors or warnings. How can this script be fixed?
Here is the script:
local rightSensorTable = {}
local leftSensorTable = {}
local touchingRightSensor = rightSensor:GetTouchingParts()
local touchingLeftSensor = leftSensor:GetTouchingParts()
for i, v in pairs(touchingRightSensor) do
print(v)
table.insert(rightSensorTable, v)
end
for i, v in pairs(touchingLeftSensor) do
print(v)
table.insert(leftSensorTable, v)
end
if table.find(touchingRightSensor, road) then
right = true
else
right = false
end
if table.find(touchingLeftSensor, road) then
left = true
else
left = false
end