Fetch player object from id

I need to fetch the player object for my program. GetPlayerByUserId only works if it can find a matching player in the game. I need to be able to fetch their player object even after they have left the game, or in the case of moderation remotely acquire the player object of a person by ID for access.
How do I do this? Can you even fetch a player by ID if they are not in game?

This is not possible…
Why do you need to do this anyways?

1 Like

Typically when a player joins a game his stats are saved with his userId in a DataStore. That’s probably where you can get that information.

We can for example obtain a character’s appearance and utilize it without any trace of them in the server using:

v.CharacterAppearance = "http://www.roblox.com/asset/CharacterFetch.ashx?userId=" ..ID
v:LoadCharacter()

We can also obtain the name or the ID from the name.
So it doesn’t seem impossible to aquire a player object for a remote player.

Example use would be comparing players’ player object upon joining with reserved player objects and not needing reserved players’ joining to work.

You can get their name with GetNameFromUserIdAsync, and other things can be filled with other PlayersService functions. You won’t be able to get the entire player instance but you can get pretty close.

The player object is removed when the player disconnects from the game.