So! its me back again! asking for help But! I want to make a gui that will allow you to see your account age! instead of using:
Code
local accountage = game.players.localpayer.AccountAge
local Text = script.parent.Text
Text.Text = "Account age is ".. accountage .." days old"
Id love to use something alike
Your account age is 1 year, 1 month, 1 week, 1 day. But my understanding of luau isn’t as good.
If I can have help thanks
1 Like
I think I found it, You spelled localplayer wrong, it should be “LocalPlayer”.
You could use os.date
-- example
print(os.date("%c", game.Players.LocalPlayer.AccountAge))
Oh this isn’t help for what I’m doing, Thanks for the help though. I’m looking for a advanced PlayerAge gui
I’ll have a look into it thanks
1 Like
I was getting confused until i realised your example aha thanks dude
RobertTBS
(RobertTBS)
December 22, 2020, 2:45am
#7
I’m a bit confused as to what you’re asking. If you mean up to the current minute/second, that is not possible. AccountAge is only Y/M/W/D.
Well if seconds is impossible i can go with y/m/w/d
Im trying os.date currently. Im just trying to utilise it in a way that i can form the number into a text label, I can understand how i can get the number’s with the basic code as a description i used. But heres a free model that i found for a diagram
walshuk
(vincenzo)
December 22, 2020, 3:27am
#10
Text labels require a string for their text property, therefore you could use the function:
tostring(number-variable-here)
and it would convert it to a string to be compatible with a text label. To actually implement this you could do either one of these methods:
TextLabel.Text = tostring(number-variable-here)
-- or
numberVariable = tostring(number-variable-here)
TextLabel.Text = numberVariable
blokav
(blokav)
December 22, 2020, 3:31am
#11
A solution I did a while back:
You shouldn’t be able to read a player’s actual birthday, but you can figure out their anniversary (when they joined) with something like this:
local player = game.Players.Blokav
local months = {
"Jan", "Feb", "Mar", "Apr",
"May", "Jun", "Jul", "Aug",
"Sep", "Oct", "Nov", "Dec"
}
local secondsExisted = player.AccountAge * 86400
local dateObject = os.date("!*t", os.time() - secondsExisted)
print(player.Name.." joined ROBLOX on around "..months[dateObject.month].." "..dateObject.day..", "..dat…
Close enough to what i need! thanks