What I want to do is retrieve all of the parts within a given three dimensional radius in a table. For example, a large ball has a size of 500, 500, 500. I want to get any part that would be inside of the ball.
I've heard that there's a way to do this with magnitude, but how?
wait(10) local brick = script.Parent local mofos = game.Workspace:GetChildren() local TheDit = 20 for i,v in pairs(mofos) do if v:IsA("Part") or v:IsA("WedgePart") or v:IsA("CornerWedgePart") then
if ((brick.Position - v.Position).magnitude<TheDit) then print(v) else end end end