local function hitPlayer(pos, size, dmg, userName, knockBack, userLV)
local pos1 = pos - (size / 2)
local pos2 = pos + (size / 2)
local region = Region3.new(pos1, pos2)
local parts = game.Workspace:FindPartsInRegion3(region, nil, 1000)
for i, v in pairs(parts) do
if v.Name == "HumanoidRootPart" and v.Parent.Name ~= userName and v.Parent:FindFirstChild("Humanoid") then
v.Parent.Humanoid:TakeDamage(dmg)
if knockBack == true then
local bv = Instance.new("BodyVelocity", v)
bv.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
bv.Velocity = userLV * 100
wait(0.1)
bv:Destroy()
end
end
end
end
I checked it out and it looks pretty cool, but I was wondering if there was a way to fix my problem and keep using Region3, just so I can finish a task, then I’ll learn Zone+