generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: Game Clock

Previous Thread :: Next Thread 
saka34 is not online. saka34
Joined: 11 Oct 2010
Total Posts: 369
29 Aug 2015 10:18 AM
I want to make a screen gui that has a 12 hr clock. You know like a regular home clock. But it needs to reset after it's up. I'm not sure how to script this. Can someone help tell me what the script needs to have? And help me write the script?
Report Abuse
saka34 is not online. saka34
Joined: 11 Oct 2010
Total Posts: 369
29 Aug 2015 10:36 AM
I have scripting knowledge. I just don't know how to do this.
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
29 Aug 2015 10:40 AM
minutes = 0 --count minutes

minute_hand = minutes % 60

hours = math.floor(minutes / 60)
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
29 Aug 2015 10:41 AM
That way you only have to increment the minutes variable and when hours >= 12 you can reset the minutes variable
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
29 Aug 2015 10:46 AM
And if you are using the rotation property for the clock hands you need this:

(hours/12)*(360)

(minutes/60)*(360)
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
29 Aug 2015 10:47 AM
All the information above should help whether you want an analog or digital clock
Report Abuse
Locard is not online. Locard
Joined: 13 Apr 2014
Total Posts: 3516
29 Aug 2015 10:58 AM
Here's something that might help a little.

local t = 120 --seconds or minutes, it doesn't matter
local ender = "am"
if t >= 720 then ender = "pm" if t >= 780 then t = t - 720 end end
local div = t%60
local minute = math.floor(t/60)
timer = (minute<10 and "0"..minute or minute)..":"..(div<10 and "0"..div or div)..ender
print(timer)
Report Abuse
saka34 is not online. saka34
Joined: 11 Oct 2010
Total Posts: 369
29 Aug 2015 10:59 AM
Well, I want more of a digital clock. Not one with hands.
Report Abuse
saka34 is not online. saka34
Joined: 11 Oct 2010
Total Posts: 369
29 Aug 2015 11:07 AM
local cl = script.Parent.Text

local cl = 12:00 AM
wait(5)
local cl = 12:01 AM
wait(5)
local cl = 12:02 AM

Could I do something like this?
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
29 Aug 2015 11:12 AM
no
Report Abuse
saka34 is not online. saka34
Joined: 11 Oct 2010
Total Posts: 369
30 Aug 2015 10:40 AM
Does anybody know anything in the wiki that I could use to help me?
Report Abuse
saka34 is not online. saka34
Joined: 11 Oct 2010
Total Posts: 369
28 Sep 2015 06:22 PM
Please?
Report Abuse
IllegallyBlind is not online. IllegallyBlind
Joined: 07 Nov 2010
Total Posts: 1691
28 Sep 2015 06:23 PM
wiki.roblox.com


Netflix and chill? I prefer Blockbuster and relax.
Report Abuse
saka34 is not online. saka34
Joined: 11 Oct 2010
Total Posts: 369
28 Sep 2015 06:26 PM
But do you know a specific post/thread/tutorial that I can use to help me?
Report Abuse
IllegallyBlind is not online. IllegallyBlind
Joined: 07 Nov 2010
Total Posts: 1691
28 Sep 2015 06:29 PM
The point is that you need to learn to script before you post here. This isn't a legitimate question, "can u help me write the script?"


Netflix and chill? I prefer Blockbuster and relax.
Report Abuse
Zakusa is not online. Zakusa
Joined: 16 Feb 2013
Total Posts: 359
28 Sep 2015 06:31 PM
no idea what you mean
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
28 Sep 2015 06:35 PM
@saka
This is a specific thread, it doesn't get any more specific than this. From this thread alone you have enough information to make a clock if you know how to script at all.
Report Abuse
saka34 is not online. saka34
Joined: 11 Oct 2010
Total Posts: 369
29 Sep 2015 05:54 PM
I do know how to script.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image