Hi. I was making overhead join date gui. i made this script whats wrong with it im new to scripting so i think i messed up. what did i do wrong?

local rp = game.ReplicatedStorage
local bill = Instance.new("BillboardGui")
bill.Parent = rp
local tl = Instance.new("TextLabel")
bill.Active = true
bill.AlwaysOnTop = true
tl.Parent = bill
tl.Active = true
bill.ExtentsOffset = Vector3.new(0, 2, 0)
tl.BackgroundTransparency = 1
tl.TextSize = 34
tl.TextScaled = true
tl.TextColor3 = Color3.new "Black"
tl.Font = "GothamBold"
bill.Size = UDim2.new(0, 200, 0, 50)
bill.LightInfluence = 1
tl.Size = UDim2.new(0, 200, 0, 50)



local day = 60 * 60 * 24 -- seconds in a day

game.Players.PlayerAdded:Connect(function(plr)
	plr.CharacterAdded:connect(function(char)
		local AA = plr.AccountAge
	end)
		local tm = os.time() - (day * plr.AccountAge) -- player join date in seconds
		local date = os.date("!*t", tm) -- convert seconds to date

		print(date.year .. "-" .. date.month .. "-" .. date.day) -- print datelocal clonedb = bill:Clone()
		
		clonedb.TextLabel.Text = "Account Age: " .. AA
		
		clonedb.Parent = char:WaitForChild("Head")
	end)

1 comment

0

This script works just fine. Make sure it's a normal script and placed in either workspace or serverscriptservice.