How would you get a player username from their Id, even if they aren't in the game?
something else that I forgot to mention is, regardless of if they are in the current game, how would you get someone's avatar. An example of a program doing this is Moon Animator, but I wanna know how they can do that with only the asset Id.
You would use the Players:GetPlayerByUserId() which is exactly what your talking about the way you would use this is by getting the Player service and putting the GetPlayerByUserId() and just paste the id inside, it would look something like this
local Players = game:GetService("Player") local PlayerId = 123456789 local player = Players:GetPlayerByUserId(PlayerId) print(player.Name) -- Should print the player name
more on the GetPlayerByUserId here - https://developer.roblox.com/en-us/api-reference/function/Players/GetPlayerByUserId