Hi, I would like a Text label to display the Account Age of a Player that is by a ImageLabel
You can use the AccountAge
property of Player. Simply set the text of the text label to the account age of the player, like this:
textlabel.Text = tostring(plr.AccountAge)
Edit: if you want to get the age of the player whose name you type in the textbox, you can do it like this if the player is in game:
local plr = game.Players:FindFirstChild(textbox.Text) if plr then textlabel.Text = tostring(plr.AccountAge) end
However if they are not in the game, you need to use HttpService
along with some api. Feel free to use my api, however note that 000webhost will probably suspend my website again if people spam it too often.
local plr = game.Players:FindFirstChild(textbox.Text) if plr then textlabel.Text = tostring(plr.AccountAge) else local uid = game.Players:GetUserIdFromNameAsync(textbox.Text) local age = game:GetService("HttpService"):GetAsync("http://lolapis.000webhostapp.com/api/age/?id=" .. tostring(uid)) textlabel.Text = age end