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: Script help?

Previous Thread :: Next Thread 
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
05 Jun 2015 12:37 PM
if game.Lighting.TimeOfDay == 18 then
script.Parent.BrickColor = "Cool Yellow" and
script.Parent.SurfaceLight.Enabled == true
end

That isnt working if the TimeOfDay is 18:00:00
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
05 Jun 2015 12:41 PM
You said it yourself.

if game.Lighting.TimeOfDay == "18:00:00" then
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
05 Jun 2015 12:44 PM
Its still not working and all I have is this inside of a script

if game.Lighting.TimeOfDay == "18:00:00" then
script.Parent.BrickColor = "Cool Yellow" and
script.Parent.SurfaceLight.Enabled == true
end
Report Abuse
epicbreaker is not online. epicbreaker
Joined: 23 Apr 2011
Total Posts: 2791
05 Jun 2015 12:56 PM
script.Parent.BrickColor = "Cool Yellow" and
script.Parent.SurfaceLight.Enabled == true

Should be:
script.Parent.BrickColor = BrickColor.new("Cool Yellow")
script.Parent.SurfaceLight.Enabled = true
---------------------

== is for comparisons (is A equal to B)
= is for assigning (Set A to B)
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
05 Jun 2015 01:08 PM
Alright. So I got this now and it still is not working :/

if game.Lighting.TimeOfDay == "18:00:00" then
script.Parent.BrickColor = BrickColor.new("Cool Yellow")
script.Parent.SurfaceLight.Enabled = true
end

when i remove 1 '=' from line 1 it gives me a red underline under the one '=' in line one
Report Abuse
amanda is not online. amanda
Joined: 21 Nov 2006
Total Posts: 5925
05 Jun 2015 01:12 PM
This code runs once, it does not constantly check.
Report Abuse
Sebrights is not online. Sebrights
Joined: 02 Feb 2011
Total Posts: 5580
05 Jun 2015 01:13 PM
OOh, your problem is that "Cool Yellow" isn't a color, it should be "Cool yellow" notice the capital you added.


-The name's Sebright.
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
05 Jun 2015 01:19 PM
I tried that and it still doesnt work
Report Abuse
SirIngenuity is not online. SirIngenuity
Joined: 06 Oct 2012
Total Posts: 3149
05 Jun 2015 01:21 PM
make it loop
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
05 Jun 2015 01:22 PM
I think I know whats going on. When its at 18:00:00 it turns on then it turns off. How do I make it go until like 5:00:00?
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
05 Jun 2015 01:47 PM
Bump
Report Abuse
MegaMashMayhem is not online. MegaMashMayhem
Joined: 12 Nov 2014
Total Posts: 63
05 Jun 2015 02:03 PM
if game.Lighting.TimeOfDay == 18:00:00 then
script.Parent.BrickColor = "Cool yellow" and
script.Parent.SurfaceLight.Enabled = true then
if game.Lighting.TimeOfDay == 5:00:00 then
script.Parent.SurfaceLight.Disabled = true
end
end
end)
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
05 Jun 2015 02:29 PM
What will that do? From my understandings it turns on at 18:00:00 then turns off at 18:00:01 because it says when the time of say is 18:00:00 nt like 18:00:00 through 5:00:00
Report Abuse
helicopter35 is not online. helicopter35
Joined: 25 Oct 2010
Total Posts: 1225
05 Jun 2015 02:40 PM
while true do
if game.Lighting.TimeOfDay == ("18:00:00") then
script.Parent.BrickColor = ("Cool yellow")
script.Parent.SurfaceLight.Enabled = true
end
end
Report Abuse
helicopter35 is not online. helicopter35
Joined: 25 Oct 2010
Total Posts: 1225
05 Jun 2015 02:41 PM
while true do
if game.Lighting.TimeOfDay == ("18:00:00") then
script.Parent.BrickColor = ("Cool yellow")
script.Parent.SurfaceLight.Enabled = true
wait()
elseif game.Lighting.TimeOfDay == ("5:00:00")then
script.Parent.SurfaceLight.Enabled = false
end
end
end
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
05 Jun 2015 03:34 PM
script.Parent.SurfaceLight.Enabled = true

with one = not 2
Report Abuse
DevKonner is not online. DevKonner
Joined: 04 Feb 2012
Total Posts: 519
06 Jun 2015 11:08 AM
Still didnt work
Report Abuse
v3c3 is not online. v3c3
Joined: 04 Feb 2009
Total Posts: 674
06 Jun 2015 11:19 AM
@amanda literally just told you what was wrong with your script.

It needs to check constantly.
Report Abuse
Henrykingfire is not online. Henrykingfire
Joined: 18 Sep 2014
Total Posts: 771
06 Jun 2015 11:42 AM
Yeah
Report Abuse
Luminak is not online. Luminak
Joined: 27 May 2012
Total Posts: 2809
06 Jun 2015 02:46 PM
script.Parent.BrickColor = "Cool Yellow"
you can't say that you have to sayu
script.Parent.BrickColor = BrickColor.new("Cool yellow")
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