local Part = game.Workspace.Part -- Your part
local RS = game:GetService("RunService")
while task.wait(0.5) do
local result = game.Workspace:GetPartsInPart(Part,nil)
print(result)
end
local part = your part
local founded = false
while wait(0.2) do
local partsInside = workspace:GetPartsInPart(part)
for i, part in pairs(partsInside) do
if part ~= nil then
founded = true
-- you code
end
end
if not founded then
-- your code when parts is not detected or you can jusr remove this
end
founded = false
end