I’ve tried so many different things to no avail. Tried with time() too, still doesn’t work. Ideally, I just wanna get the start time once (when you join the game) and it’ll automatically update the necessary info for the client, without making calls to the server every second
local StartTime = SettingsService:GetServerStart()
print(StartTime)
task.spawn(function()
while true do
self.HUD.Settings.Uptime.Text = "Server started: " .. os.date("%c", StartTime) .. " | Server uptime: " .. Library:ConvertTime(os.time() - StartTime, 3)
task.wait(1)
end
end)
In a server script you can set an attribute on ReplicatedStorage with the server start time os.time(), then access that once in a client script. After that you can update every second with the difference between the os.time() and the start time. Here is a place I just made where it is done: https://www.roblox.com/games/9976295163/test
local ServerStart = os.time()
local currTime = "Server started: "..os.date("%c",ServerStart).." | Server uptime: "..math.floor(workspace.DistributedGameTime)