Ok, so i want to make a group chest, and I was wondering how I do the %x specifier to get it to print xx:xx:xx. I can find times and stuff but its in seconds since Epoch
os.time()
→ seconds since epoch
os.date("%X", os.time())
→ seconds since epoch formatted to HH:MM:SS ("%x" is DD/MM/YY)
1 Like
local player = game.Players.LocalPlayer
print(player:FindFirstChild("Values"):FindFirstChild("NormalChestTime").Value)
print(os.time())
while wait(1) do
local diff = player:FindFirstChild("Values"):FindFirstChild("NormalChestTime").Value - os.time()
game.Workspace.Map["Starter zone"]["Daily chest"]["Daily Chest UI"].BillboardGui.TextLabel.Text = os.date("%X",diff)
end
Why is this erroring?
Players.U_npluggedDev.PlayerGui.LocalScript:6: invalid argument #3 (string expected, got nil) - Client - LocalScript:6
Try tostring()
the result of obtaining the os.date()
?