I want to be able to find players account age without them being in the game. It's easy to find players account age when they are in the game...
1 | local player = game.Players.NordicM --Using my IGN for this example |
2 | print ( tostring (player.AccountAge)) |
Is there any possible way to get a players account age from a UserID?
I've seen people getting a players account age from an api. If you can't get a players account age from a UserID, how do you do get information from an api
The AccountAge
is a Player property that describes how long ago a player’s account was registered in days. It is set using the Player:SetAccountAge
function, which cannot be accessed by scripts.
This property is useful for conditionally showing new Roblox players content such as tutorials.
for example:
01 | local Players = game:GetService( "Players" ) |
02 |
03 | local MAX_AGE_NEW_PLAYER = 7 -- a week |
04 | local MIN_AGE_VETERAN = 365 -- one year |
05 |
06 | -- This function marks a part with text using a BillboardGui |
07 | local function mark(part, text) |
08 | local bbgui = Instance.new( "BillboardGui" ) |
09 | bbgui.AlwaysOnTop = true |
10 | bbgui.StudsOffsetWorldSpace = Vector 3. new( 0 , 2 , 0 ) |
11 | bbgui.Size = UDim 2. new( 0 , 200 , 0 , 50 ) |
12 | local textLabel = Instance.new( "TextLabel" ) |
13 | textLabel.Size = UDim 2. new( 1 , 0 , 1 , 0 ) -- Fill parent |
14 | textLabel.Text = text |
15 | textLabel.TextColor 3 = Color 3. new( 1 , 1 , 1 ) |