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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 19 Jul 2010 |
| Total Posts: 4047 |
|
| |
|
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
|
  |
| Joined: 11 Oct 2010 |
| Total Posts: 369 |
|
| |
|
|
| 28 Sep 2015 06:23 PM |
wiki.roblox.com
Netflix and chill? I prefer Blockbuster and relax. |
|
|
| Report Abuse |
|
|
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 |
|
|
|
| 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
|
  |
| Joined: 16 Feb 2013 |
| Total Posts: 359 |
|
| |
|
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
|
  |
| Joined: 11 Oct 2010 |
| Total Posts: 369 |
|
| |
|