Instead of a Square fighting arena, I want to make a circle arena. so I can give the Players swords and alow fighting.

Not really. But you could just do the math yourself. It sounds like you actually want a cylinder, not a sphere?

```
-- Checks if a given point is within the bounds of a vertical cylinder.
-- pos: Vector3 - the point to check
-- cylinderCenter: Vector3 - the center of the cylinder
-- cylinderRadius: number - the radius of the cylinder
-- cylinderHeight: number - the height of the cylinder
local function IsPositionInCylinder(pos, cylinderCenter, cylinderRadius, cylinderHeight)
local offset = pos - cylinderCenter;
local halfHeight = cylinderHeight / 2
-- pythagorean theorem without sqrt to get squared distance
local distanceSquared = offset.X * offset.X + offset.Z * offset.Z
return offset.Y > -halfHeight and offset.Y < halfHeight and distanceSquared < cylinderRadius * cylinderRadius
end
```

You would just call that function, for example using the position of the playerâ€™s root part, and if it returns true you would give the player a tool or whatever.

## If you really wanted a sphere instead...

```
-- Checks if a given point is within the bounds of a sphere.
-- pos: Vector3 - the point to check
-- sphereCenter: Vector3 - the center of the sphere
-- sphereRadius: number - the radius of the sphere
local function IsPositionInSphere(pos, sphereCenter, sphereRadius)
local offset = pos - sphereCenter;
local distanceSquared = offset.X * offset.X + offset.Y * offset.Y + offset.Z * offset.Z
return distanceSquared < sphereRadius * sphereRadius
end
```

Edit: since I wrote this answer two years ago, roblox has highly optimized Vector3 math. I would need to retest these functions to see if it is still faster to avoid the `sqrt`

So for â€śpos:â€ť do i Need the Position of the playerâ€™s HumanoidRootPart or is it the position of the Sphere?

`pos`

is the position of the playerâ€™s HumanoidRootPart.

canâ€™t they just do

```
local magnitude = (HRP.Position * Vector3.new(1,0,1) - cylinderPosition * Vector3.new(1,0,1)).Magnitude
if magnitude <= cylinderRadius then
--inside the bounds
else
--outside of the bounds
end
```

You can use magnitude, it is exactly like a ball, it is returned with a number aka distance.

Thanks for the Help, I know i Could have used Magnitude, but for a specific situation I had to use your method.

Sure, yes. But it would not include height, and would be slightly slower.