Gmod Lua: Freezing all Players near Owner

I have a weapon that uses player.GetAll() to freeze all players in the server for a few seconds:



for k, v in pairs( player.GetAll() ) do
			if v != self.Owner then
				v:Freeze( true )
				v:SetMoveType(MOVETYPE_NOCLIP)
			end
		end


However, I want that effect to instead freeze players that are near the owner and not all players

You’d need to add a distance check between v’s position and self.Owner’s position (

Entity:GetPos) using

Vector:Distance.

Thank You, that helped me out

Would

ents.FindInSphere not be easier?