How do I GetPlayerByUserId() when they're offline

Hello I just got this issue where when I try to get players data from
GetPlayerByUserId() it doesent work when they are offline

What can I do to fix this

1 Like

Thats impossible to do because the Player object doesn’t exist, what player information are you trying to get?

I’m tryna get their name simply

use Players:GetNameFromUserIdAsync()

Will I be able to get it even if that player is offline?

Yes, it gets their name from the Roblox database.

yes, you just need to have the userid

also i recommend wrapping it in a pcall because this method can sometimes throw errors

Dzang alr I’ll try that, thanks for the help yalls

1 Like

Btw can I get thumbailasync with the userid even if the player is offline?

yes you can use thumbailasync on an offline player

Okay then you helped me brotha get that checkmark

2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.