So. Basically im trying to find a value / string inside the table that GetTouchingParts() returns. But for some reaon its not working.. Heres my code atm:
while true do local TABLE = Part:GetTouchingParts() if table.find(TABLE, "Stop") then print("Stopped loop") break end wait() end
If I understand what you mean you're trying to detect parts that are touching Part specifically a part called 'Stop'. Just put a for loop inside of a repeat loop.
local part = workspace.Part -- The part that you're trying to find which is touching it. local stopPart = workspace.Stop -- The stop part local found = false --Check whether if it was found repeat local TABLE = part:GetTouchingParts() for index, value in pairs(TABLE) do if value.Name == "Stop" then found = true end end wait() until found == true -- this works like an if statement.