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 » Scripting Helpers
Home Search
 

How do I make it so a GUI won't show the whole time?

Previous Thread :: Next Thread 
jatl8 is not online. jatl8
Joined: 07 Aug 2009
Total Posts: 17439
06 Dec 2013 10:46 PM
Ok so I want this GUI to show the time of Lighting. I dont want it to show like this though:

XX:XX:XX

I want it to show it like this

XX:XX

And if its possible to be 12 hrs. not 24.

The script of the GUI is this:




local GUI = script.Parent

while true do
GUI.Text = game.Lighting.TimeOfDay
wait(0.1)
end

Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
06 Dec 2013 10:50 PM
If game.Lighting.TimeOfDay == 13 then
script.Parent.Text = game.lighting.timeofday - 12
Else

Code
End
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
06 Dec 2013 10:51 PM
Unfortunalty I dunno know how to block out minutes
Report Abuse
jatl8 is not online. jatl8
Joined: 07 Aug 2009
Total Posts: 17439
07 Dec 2013 12:03 AM
I guess it helps thanks.
Report Abuse
wazap is not online. wazap
Joined: 29 Jun 2007
Total Posts: 23234
07 Dec 2013 12:07 AM
So many problems with night's script

local GUI = script.Parent

while true do
if tonumber(game.Lighting.TimeOfDay:sub(1,2))> 12 then
GUI.Text = tonumber(game.Lighting.TimeOfDay:sub(1,2))-12..game.Lighting.TimeOfDay:sub(3,5)
elseif tonumber(game.Lighting.TimeOfDay:sub(1,2))==0 then
GUI.Text = "12"..game.Lighting.TimeOfDay:sub(3,5)
else
GUI.Text = game.Lighting.TimeOfDay:sub(1,5)
end
wait(0.1)
end
Report Abuse
nighttimeninja314 is not online. nighttimeninja314
Joined: 04 Apr 2011
Total Posts: 4001
07 Dec 2013 10:06 PM
Sorry, I wrote on mobile, id do more efficiently on cp
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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