How can i prevent the region3 from doing damage multiple times?
local replicated = game.ReplicatedStorage
local remote = replicated.HumanOrSpecs.BasicHuman.RPunch
local debounce = false
remote.OnServerEvent:Connect(function(player,char)
local regionbase = char.HumanoidRootPart.CFrame * CFrame.new(0,0,-2).p
local RegionThree = Region3.new(regionbase-Vector3.new(2,2,2),regionbase+Vector3.new(2,2,2))
local fpir3 = workspace:FindPartsInRegion3(RegionThree,nil,20)
--hitbox thingy stuff
for i,v in pairs(fpir3) do
if v.Parent:FindFirstChild("Humanoid") and v.Parent ~= char then
print("Humanoid hit!")
v.Parent:FindFirstChild("Humanoid"):TakeDamage(13)
end
end
end)
And it prints this:
How can i get it to only hit once and not 6 times?