Every entity that exists in the game world has a unique entity ID. It is a 64-bit unsigned integer, represented in Lua as a string. This also applies when multiple instances of the same entity exist simultaneously. Additionally, entity IDs are dynamic, meaning that an entity that is always being spawned, like the local player, will have a different ID each time the game is run. An exception to this are entities inside WLUs as they have pre-defined IDs.
Invalid Entity ID
Some functions that return an entity ID might return one that is invalid. An entity ID can always be compared against GetInvalidEntityId to check whether it is valid or not.