How to get player info

So I’m making a surface GUI and I wanted to know how to add player info to it. Like how many days the player has had the account. join date. players name?
I don’t want it to show other players info for other people. like If player 1 joins the surface gui shows player 1s info. and if player 2 joins the surface gui shows player 2s info but for their screen only. So client only.


You can use a Local Script to only show it to the player.

And you probably should learn about this:

1 Like

Local scripts are definitely your friend for this

You can do http requests to get the info and use LocalScript’s and RemoteEvent’s to make the info only shown to 1 player.

Here’s a example:

local HttpService = game:GetService("HttpService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")

local userId = 1
local data = HttpService:GetAsync("" .. userId)

ReplicatedStorage.SendPlayerInfo:FireClient(game.Players:GetPlayers()[1], data)
   -- show data here

Edit: Use ozyubkx’s solution instead

1 Like

I would recommend using and player.AccountAge to calculate join date, and player.Name for player name. If you need any other info just look at the Player class reference (sent by first reply). I would use http requests as a last resort since there is a limit to amount you can send per minute and it’s just slower.


print("%Y-%m-%d", os.time() - game.Players.LocalPlayer.AccountAge * 86400))

prints localplayer join date


Question. I don’t know much about Os.Date but what do the numbers at the end mean?:


amount of seconds in a day since AccountAge is in days and works with seconds

1 Like