First time using GetPartsBoundInRadius and I put 15 as the radius argument while also creating a sphere with the size of Vector3.new(15,15,15).
The sphere is the size that I want yet its hitting further than it should be
Server script:
local function getParts(partType, Cframe, size, offset, overlap, visualize)
if partType == "box" then
local cf = Cframe * offset
if visualize then
visualizeHitBox(cf, size, Enum.PartType.Block)
end
return workspace:GetPartBoundsInBox(cf, size, overlap)
else -- if its a sphere
local cf = Cframe * offset
if visualize then
visualizeHitBox(cf, size, Enum.PartType.Ball)
end
print(size.X)
return workspace:GetPartBoundsInRadius(cf.Position, size.X, overlap)
end
end
– these are the important variables the others are for other stuff
offset = CFrame.new(0,0,0)
Cframe = hrp.CFrame
size = Vector3.new(15,15,15)