will this code affect negatively game perfomance?
local detectionPart = workspace:WaitForChild("Cartonete"):WaitForChild("Detetor")
local function checkPartsInPart()
local partsInRegion = workspace:GetPartsInPart(detectionPart)
for _, part in ipairs(partsInRegion) do
if part:IsA("BasePart") and part.Name == "Cart" then
print("Cart Touched!")
end
end
end
while true do
checkPartsInPart()
wait(0.1) -- Check every 0.1 second; ad
end