I have a Gui and what i does is when you enter the game is say's your name, Hello('Player') then it say's how old your account is in years and days. The problem is when i added this code -- if years<days then textLabel.Text=years+1 -- what it's suppose to do is when the account age in days get passed 365 it rounds the years up 1 number but instead it deletes the days part and all the text and just this number pops up (7.3562534562) How do i fix this and make it work properly. If you fix this you will be my Hero forever!
game.Players.PlayerAdded:connect(function(plr)
local screenGui = Instance.new("ScreenGui")
screenGui.Parent = plr:WaitForChild("PlayerGui")
local frame = Instance.new("Frame")
frame.Parent = screenGui
frame.Size = UDim2.new(1,0,1,0)
frame.Position = UDim2.new(0,0,0,0)
frame.BackgroundColor3 = Color3.new(0,0,0)
local frame2 = Instance.new("Frame")
frame2.Parent = screenGui
frame2.Size = UDim2.new(0.9,0,0.9,0)
frame2.Position = UDim2.new(0.05,0,0.05,0)
frame2.BackgroundColor3 = BrickColor.White().Color
local days=plr.AccountAge
local years=days/365
local textLabel = Instance.new("TextLabel")
textLabel.Parent = frame2
textLabel.Position = UDim2.new(0.05,0,0.05,0)
textLabel.Size = UDim2.new(0.9,0,0.9,0)
textLabel.BackgroundColor3 = BrickColor.White().Color
textLabel.FontSize = "Size24"
textLabel.Text=('Hello '..plr.Name)
wait(3)
textLabel.Text=('Your Account is '..years..' years old ('..days..') Days old')
if years<days then
textLabel.Text=years+1
end
end)

4 comments
Crap, ya beat me to it xD Upvoted
Lol, :P
On years it say's 0 and that's not true
I edited it, try refreshing, I had something wrong, but i noticed it quickly and fixed it.