This should work:
secondTime = what time it is
hourTime = nil
while true do
wait(1)
time += 1
hourTime = (math.floor(secondTime/(60*60)))
end
i havent tested it though since i dont wanna open up studio
This should work:
secondTime = what time it is
hourTime = nil
while true do
wait(1)
time += 1
hourTime = (math.floor(secondTime/(60*60)))
end
i havent tested it though since i dont wanna open up studio
oh and
if hourTime > 6 and < 12 then
--script
end
or vice versa
Can you be more clear with this line? You want a GUI clock or what?
In your second Script, you have a startTime, but it uses tick(), but let me tell you that tick is the time in seconds since 1 January 1970, so can you explain what you did in that line? Because for me, it’s too confusing.
wrong, the script basically fetches the game time and displays it, tick()
is every second in a roblox game iirc, not unix timestamp
the script will display the time as 06:00 AM
if the clock time is 06:00:00
or game time is 6
You may see here what tick() is.
yeah but that has nothing to do with the script i sent
it does what i said it does, it does NOT display the current # of seconds since 1/1/70
But I don’t get like why are you subtracting the no. of seconds from the tick()? Like tick() is a huge no. so subtracting from it doesn’t make any sense to me atleast. That’s why I asked for a clear explaination so I learn about what you did.
what is your point dude?
it works fine, test it if you want to
This is what I’m trying to say.
I didn’t mean that the script would show that time. I’m not that dumb. I mean why you added tick()? It is the no. of seconds since 1/1/1970
How is tick()
a huge no? if anything this is the most efficient way to make the clock system work.
So you should atleast give credits. Also you should atleast know what is the script doing rather than just posting
Btw tick() is a huge no. because it’s literally the no. of seconds since 1/1/1970, I even linked a post about it above.
(Don’t think I got toxic buddy. I’m just here to learn new things and help people.)
and before you question, i have 2y of experience
Hmm, if you are really 2 years experienced, then you should have known that what exactly tick() is. And it will be really good for “beginners” like me if you explain that specific line of code. Like what you did exactly there. See I’m not here to fight but to learn.
I’m sorry to tell you, but Moneypro456789 is correct, and you are incorrect.
Ok, finally you got the point of what I’m trying to say.
who are you dude? Do I need to make a test place to visualise what it does? because you are disproving yourself.
in fact it seems like Im going to have to do that because you dont have the mental capacity to understand what Im saying.
No, you appear to have misunderstood the functionality of tick()
. Please read a documentation before going into a forum and bragging about your “2 years” of experience, it’s not even a lot.