Well I have a script that detects errors, and prints them and then puts them on a surface gui. But I also have it to tell me the time of the error, the issue is it won't add the time value in the value, it just prints it and no errors, just ignores the time value, it should be a set of numbers like 14858394.193 something like that. Heres the model link, its just the board with the surface guis and not the scripts Heres the main script Not local its in workspace
local ScriptContext = game:GetService('ScriptContext') local getTime = require(game.ServerScriptService.Time) local ErrorBoard = game.Workspace:WaitForChild("ErrorBoard") local Errors = ErrorBoard:WaitForChild("ErrorsFolder") local ErrorsDisplay = ErrorBoard:WaitForChild("Errors").MainError wait() ScriptContext.Error:connect(function(Error, Trace, Script) --Event ScriptContext.Error(string message, string stackTrace, Instance script) print(Error, Trace, Script, getTime()) if Errors["1"].LineUsed.Value == false then Errors["1"].LineUsed.Value = true print'Line 1' Errors["1"].Value = Error, Trace, Script, getTime() ErrorsDisplay["1"].Text = Errors["1"].Value ErrorsDisplay["1"].LineUsed.Value = true elseif Errors["2"].LineUsed.Value == false then Errors["2"].LineUsed.Value = true print'Line 2' Errors["2"].Value = Error, Trace, Script, getTime() ErrorsDisplay["2"].Text = Errors["2"].Value ErrorsDisplay["2"].LineUsed.Value = true elseif Errors["3"].LineUsed.Value == false then Errors["3"].LineUsed.Value = true print'Line 3' Errors["3"].Value = Error, Trace, Script, getTime() ErrorsDisplay["3"].Text = Errors["3"].Value ErrorsDisplay["3"].LineUsed.Value = true elseif Errors["4"].LineUsed.Value == false then Errors["4"].LineUsed.Value = true print'Line 4' Errors["4"].Value = Error, Trace, Script, getTime() ErrorsDisplay["4"].Text = Errors["4"].Value ErrorsDisplay["4"].LineUsed.Value = true end end)
Heres the module script its in serverscriptservice
local TimeServer = "http://www.timeapi.org/utc/now?%25Q" local CurrentTime = tonumber(game:GetService("HttpService"):GetAsync(TimeServer, true)) local ServerTime = tick() return function() return (CurrentTime / 1000) - ServerTime + tick() end
Example script, workspace,
local getTime = require(game.ServerScriptService.Time) wait() print(getTime()) wait(1) print(getTime())