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
 

Re: timeOfday script - I hate coding grammar!

Previous Thread :: Next Thread 
ClutchRelease is not online. ClutchRelease
Joined: 07 Apr 2012
Total Posts: 144
20 May 2012 09:49 AM
OK, so, the script named 'timeOfday' is the child of Lighting. The code it contains is:

script.Parent.TimeOfDay = 06:00:00
wait(1)
script.Parent.TimeOfDay = 12:00:00
wait(1)
script.Parent.TimeOfDay = 18:00:00
wait(1)
script.Parent.TimeOfDay = 00:00:00
wait(1)
return
-- -CR

I even put outputs in there once, but it isn't even showing them. I put the times in "s, and it still wouldn't work. Any help?
Thanks!

-CR
Report Abuse
MasterOfDeathOnes is not online. MasterOfDeathOnes
Joined: 21 Mar 2009
Total Posts: 6975
20 May 2012 09:50 AM
while true do
script.Parent.TimeOfDay = 06:00:00
wait(1)
script.Parent.TimeOfDay = 12:00:00
wait(1)
script.Parent.TimeOfDay = 18:00:00
wait(1)
script.Parent.TimeOfDay = 00:00:00
wait(1)
end
Report Abuse
Penjuin3 is not online. Penjuin3
Joined: 05 Sep 2009
Total Posts: 175
20 May 2012 09:50 AM
Place it in workspace, change script.Parent to game:GetService("Lighting") and see what happens
Report Abuse
ClutchRelease is not online. ClutchRelease
Joined: 07 Apr 2012
Total Posts: 144
20 May 2012 09:51 AM
Thanks :D
Report Abuse
ClutchRelease is not online. ClutchRelease
Joined: 07 Apr 2012
Total Posts: 144
20 May 2012 09:53 AM
@MasterOfDeathOnes,
Still not working. Lemme try the other guy's one (sorry I'm calling you 'the other guy', but I didn't read your username before I started this post :/)
Report Abuse
ClutchRelease is not online. ClutchRelease
Joined: 07 Apr 2012
Total Posts: 144
20 May 2012 09:55 AM
Output is reading as:
15:54:06 - Workspace.timeOfday:2: unexpected symbol near ':'
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
20 May 2012 09:56 AM
Use Master's one with "s
Report Abuse
Valone is not online. Valone
Joined: 08 Feb 2012
Total Posts: 4371
20 May 2012 09:56 AM
Scripts do not run in lighting....but add this into workspace.

Time = 0
while wait(1) do
Time = Time+6
if Time > 24 then
Time = 0
end
game.Lighting.TimeOfDay = tostring(Time)..":00:00"
end
Report Abuse
ClutchRelease is not online. ClutchRelease
Joined: 07 Apr 2012
Total Posts: 144
20 May 2012 10:12 AM
@above,
but I want it to happen more than once, so that wouldn't work.
Report Abuse
Valone is not online. Valone
Joined: 08 Feb 2012
Total Posts: 4371
20 May 2012 10:14 AM
Yes it will.
Report Abuse
rangersmash is not online. rangersmash
Joined: 18 Nov 2009
Total Posts: 2891
20 May 2012 10:14 AM
Val's would work.
If you cannot script, test before criticizing.

-[ ɥsɐɯsɹǝƃuɐɹ ]-
Report Abuse
ClutchRelease is not online. ClutchRelease
Joined: 07 Apr 2012
Total Posts: 144
20 May 2012 10:23 AM
You're implying that I can't script?
Report Abuse
Valone is not online. Valone
Joined: 08 Feb 2012
Total Posts: 4371
20 May 2012 10:25 AM
Yes, because the majority of scripters would recognise that to be a continuous loop.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
20 May 2012 10:27 AM
y u tostring ehh?
Report Abuse
ClutchRelease is not online. ClutchRelease
Joined: 07 Apr 2012
Total Posts: 144
20 May 2012 10:28 AM
So you wouldn't forget that after 2 years of not playing, forgetting your login and then having to make another?
Report Abuse
Valone is not online. Valone
Joined: 08 Feb 2012
Total Posts: 4371
20 May 2012 10:28 AM
I like to be precise with my instructions.
Report Abuse
Valone is not online. Valone
Joined: 08 Feb 2012
Total Posts: 4371
20 May 2012 10:29 AM
@Clutch, no you would not.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
20 May 2012 10:30 AM
but u laik insult lua cuz he can laik do it without tostring helpppp derppp


Report Abuse
Maradar is not online. Maradar
Joined: 06 Mar 2012
Total Posts: 4478
20 May 2012 10:31 AM
while true do
script.Parent.TimeOfDay = 06:00:00
wait(1)
script.Parent.TimeOfDay = 12:00:00
wait(1)
script.Parent.TimeOfDay = 18:00:00
wait(1)
script.Parent.TimeOfDay = 00:00:00
wait(1)
return else end
Report Abuse
ElectricBlaze is not online. ElectricBlaze
Joined: 18 Jul 2011
Total Posts: 22930
20 May 2012 10:31 AM
@Valone - Your blurb is a lie. I know tons of female scripters. Most of them don't come on SH anymore, but the majority are still on ROBLOX nonetheless. :P
Report Abuse
ClutchRelease is not online. ClutchRelease
Joined: 07 Apr 2012
Total Posts: 144
20 May 2012 10:31 AM
Val, you don't know what I forget and what I do not.
Report Abuse
Valone is not online. Valone
Joined: 08 Feb 2012
Total Posts: 4371
20 May 2012 10:32 AM
@Electric. I know a lot of female scripters who can do very little. But not the sort of scripting I am on about.

Although, if you can show me, I'd love to meet them.
Report Abuse
su8 is not online. su8
Joined: 06 Mar 2009
Total Posts: 6334
20 May 2012 10:33 AM
If you forget that simple things you should either,
a) quit trying to script
b) hang yourself
Report Abuse
rayoma is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
20 May 2012 10:34 AM
@clutch
To make this easier on you, there's two methods in lighting known as `GetMinutesAfterMidnight()` and `SetMinutesAfterMidnight()` so you can easily make a working TimeOfDay script by just doing this :

    local l=game.Lighting;
    
    while Wait() do
        l:SetMinutesAfterMidnight(l:GetMinutesAfterMidnight()+1);
    end
Report Abuse
Maradar is not online. Maradar
Joined: 06 Mar 2012
Total Posts: 4478
20 May 2012 10:35 AM
@su8
"b) hang yourself"

Threatening much?
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