Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would i go about making this time script on a text box?

So I have this script, but don't know how I would go about making time on a text box? Any help?

local Lighting = game:GetService("Lighting")
local button = script.Parent.TextLabal

local hourRaw = tonumber(Lighting.TimeOfDay:match("^%d+"))
local hour12h = math.floor(hourRaw % 12)
local isPM = (hour / 12) >= 1

if hour12h == 0 then
    hour12h = 12
end

1 answer

you created a button,


local button = script.Parent.TextLabal 

1st you need to make sure if there is really such thing in the parent object, 2nd you may have a typo.

but mostly important, yes, there is a TextLabal you have created, but you have never try to put some text in it to display the information!!!!

This discussion is preserved as it was. New answers, comments, and votes are closed.