How do i get a players userid?

How do i get a players userid
i thought getplayerbyuserid can solve it but it didnt work
and i tried to get userid from the localplayer too but i got the userid folder just couldnt find a way to get into it, any feedback is thankful!

5 Likes

Use Player.UserId. See more here:

game.Players:GetPlayerByUserId() returns a player, and Player.UserId returns the Player’s UserId.

11 Likes