local Icon = require(game:GetService("ReplicatedStorage").Icon)
Icon.new()
:setName("hi")
local function MilitaryToStandard(hour)
return if hour > 12 then hour - 12 else hour, if hour > 12 then true else false
end
local function ConvertTo2Digit(digit)
return if #tostring(digit) < 2 then 0 .. digit else digit
end
local res
local icon = Icon.getIcon("hi")
while true do
local date = os.date("!*t", os.time() + (3600 * -4))
local min = ConvertTo2Digit(date.min)
local hour, isPM = MilitaryToStandard(date.hour)
local sec = ConvertTo2Digit(date.sec)
local result = "EST TIME ".. hour .. ":" .. min ..":" .. sec
res = result
icon:setLabel(result)
icon:align("Right")
icon:lock()
wait(.000001)
end
I really need this fixed, feel free to message me or reply if you have a fix or question!
I can’t see why it would. But maybe (until it’s fixed) assign a variable at the point of creation (although I’ve used RunService here instead of a loop, because task.wait is better than wait, but Runservice will go at the fastest possible refresh - rather than defining such a small wait time).
local RunService = game:GetService("RunService")
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local icon = Icon.new()
:align("Right")
:lock()
local res
local function MilitaryToStandard(hour)
return if hour > 12 then hour - 12 else hour, if hour > 12 then true else false
end
local function ConvertTo2Digit(digit)
return if #tostring(digit) < 2 then 0 .. digit else digit
end
RunService.Heartbeat:Connect(function()
local date = os.date("!*t", os.time() + (3600 * -4))
local min = ConvertTo2Digit(date.min)
local hour, isPM = MilitaryToStandard(date.hour)
local sec = ConvertTo2Digit(date.sec)
local result = "EST TIME ".. hour .. ":" .. min ..":" .. sec
res = result
icon:setLabel(:setLabel(toHMS(DateTime.now().UnixTimestamp-events.TimeStamp.Value), "deselected") )
end)
I’ve tried this and it works.
However, I would suggest you use DateTime. For example this code (which is much simpler) gives the user the time in their local time:
local RunService = game:GetService("RunService")
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local icon = Icon.new()
:align("Right")
:lock()
RunService.Heartbeat:Connect(function()
local dt = DateTime.now()
icon:setLabel(dt:FormatLocalTime("hh:mm:ss", "en-us"), "deselected")
end)
--[[
local Icon = require(game:GetService("ReplicatedStorage").Icon)
Icon.new()
:setName("hi")
local function MilitaryToStandard(hour)
return if hour > 12 then hour - 12 else hour, if hour > 12 then true else false
end
local function ConvertTo2Digit(digit)
return if #tostring(digit) < 2 then 0 .. digit else digit
end
local res
local icon = Icon.getIcon("hi")
while true do
local date = os.date("!*t", os.time() + (3600 * -4))
local min = ConvertTo2Digit(date.min)
local hour, isPM = MilitaryToStandard(date.hour)
local sec = ConvertTo2Digit(date.sec)
local result = "EST TIME: ".. hour .. ":" .. min ..":" .. sec
res = result
icon:setLabel(result)
icon:align("Right")
icon:lock()
wait(.000001)
end
--]]
local RunService = game:GetService("RunService")
local Icon = require(game:GetService("ReplicatedStorage").Icon)
local icon = Icon.new()
:align("Center")
:lock()
local res
local function MilitaryToStandard(hour)
return if hour > 12 then hour - 12 else hour, if hour > 12 then true else false
end
local function ConvertTo2Digit(digit)
return if #tostring(digit) < 2 then 0 .. digit else digit
end
RunService.Heartbeat:Connect(function()
local date = os.date("!*t", os.time() + (3600 * -4))
local min = ConvertTo2Digit(date.min)
local hour, isPM = MilitaryToStandard(date.hour)
local sec = ConvertTo2Digit(date.sec)
local result = "EST TIME ".. hour .. ":" .. min ..":" .. sec
res = result
icon:setLabel(result, "deselected")
end)
wait(.5)
local shop = game.Players.LocalPlayer.PlayerGui.time
Icon.new()
:setLabel("Session times")
:bindEvent("deselected", function()
shop.Enabled = not shop.Enabled
end)
:oneClick()
:align("Right")
Hey i have v3 mostly working but i have an issue, lets say i notify on an topbar button in this case my rules button and then the core gui gets disabled, the notify icon shifts and looks weird:
Heres what it looks like:
i am pretty sure im using the latest version since i updated a few days ago, is there any way to prevent this from happening or am i out of luck?
Hi! I’m constructing a custom notice graphic and was wondering if it was possible to achieve what’s shown in the image. I cannot seem to get the outline of the circle to be white, is there a way to make that happen?