Region 3 hitbox / hit detection

Hello, I am quite new and inexperienced with dealing with Region3’s. I’m trying to make a hit detection system but I can’t quite understand how to remove or destroy the region after some time. I used a while loop and a debounce but that is just inefficient and does not even work properly sometimes.

local ReplicatedStorage = game:GetService("ReplicatedStorage")

ReplicatedStorage.Carry.OnServerEvent:Connect(function(player, center)
	local region = Region3.new(center - Vector3.new(2,1,2), center + Vector3.new(2,1,2))
	local partsInRegion = workspace:FindPartsInRegion3WithIgnoreList(region, {workspace.Baseplate, table.unpack(player.Character:GetChildren())}, 1)
	
	local debounce = false

	----------[ VISUALS ]---------
	
	local part = Instance.new("Part")
	part.CFrame = region.CFrame
	part.Size = region.Size
	part.Anchored = true
	part.CanCollide = false
	part.Transparency = 0.5
	part.Parent = workspace
	
	game:GetService("Debris"):AddItem(part, 0.1)
	
	----------[ VISUALS ]---------
	
	while wait(0.1) do
		if not debounce then
			debounce = true

			for i, bodyPart in pairs(partsInRegion) do
				local character = bodyPart.Parent
				if character:FindFirstChild("Humanoid") then

					print("character detected.")
				end
			end

			wait(1)

			debounce = false
		end
	end
end)

P.S:

I figured this out but I still am not sure if it’s efficient or not. But definitely, it is way more efficient than the prior script.

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local RunService = game:GetService("RunService")

ReplicatedStorage.Carry.OnServerEvent:Connect(function(player, center)
	local region = Region3.new(center - Vector3.new(2,1,2), center + Vector3.new(2,1,2))
	local partsInRegion = workspace:FindPartsInRegion3WithIgnoreList(region, {workspace.Baseplate, table.unpack(player.Character:GetChildren())}, 1)

	local heartbeat
	
	local debounce = true

	----------[ VISUALS ]---------
	
	local part = Instance.new("Part")
	part.CFrame = region.CFrame
	part.Size = region.Size
	part.Anchored = true
	part.CanCollide = false
	part.Transparency = 0.5
	part.Parent = workspace
	
	game:GetService("Debris"):AddItem(part, 0.1)
	
	----------[ VISUALS ]---------
	
	for i, v in pairs(partsInRegion) do
		local character = v.Parent
		local humanoid = character:FindFirstChild("Humanoid")
		
		if humanoid and debounce then
			debounce = true
			
			humanoid:TakeDamage(10)
			print("sheesh")
		end
	end
end)