GMod - Get entities + magn

Hi dar.

I’m expirienced rblx.lua coder but quiiite new at gmod lua.

So, can anyone tell me how to get all current game entities?
And how do I get the magnitude of a entity compared to my player?


Roblox Lua is stupid.

To get entities, you can use ents.GetAll();

Roblox lua is fine :stuck_out_tongue:

Do you know how to get magnitude?

If you mean the distance between two entities, that would be entity:GetPos():Distance(entity:GetPos()). This will give you the distance between two entities, where each point is at their feet.

magnitude of what? vectors? vector:Length()