Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How to get access to players account age help?

I am having problem getting access to the players account age. I got the script right here. I just need help finding out a way to get access to the players account age.

local s = script.Parent

game.Players.PlayerAdded:connect(function(p)
	s.Visible = true
	s.Text = p.Name.." Has Joined The Server! | Account Age:" -- that is where I want the account age
	wait(3)
	s.Visible = false
	s.Text = "" -- don't worry I want the text to be nothing when the script is over
end)

2 answers

player.AccountAge (assuming player is your player variable)

Wiki Page

Next time, use the Wiki or the Object Browser.

1 comment

0

Also: PlayerAdded events don't work well in LocalScripts, and server Scripts should not be used inside GUIs. Use RemoteEvents to handle the event in a LocalScript and fire it in a server Script.

If you where gonna make a "Message" to show who and accountage joined you would have this...

game.Players.PlayerAdded:connect(function(Player)
m=Instance.new("Message",workspace) 
m.Text=(Player.Name.." Has Joined The Sever! | AccountAge="..Player.AccountAge)
wait(5)
m:remove()
end)

This discussion is preserved as it was. New answers, comments, and votes are closed.