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: Streetlight Bug

Previous Thread :: Next Thread 
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 01:53 PM
So I made a streetlight script with some help, but whenever the script runs, the light goes on at 390 (6:30) and turns off at 0 (Midnight)



while wait() do
if t:GetMinutesAfterMidnight() <= 1050 then
print(1)
sp.PointLight.Enabled=true
sp.BillboardGui.Enabled=true
elseif t:GetMinutesAfterMidnight() <= 390 then
print(2)
sp.PointLight.Enabled=false
sp.BillboardGui.Enabled=false
end
print("Still Working")
end




The script looks fine to me, please help?
Report Abuse
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 01:54 PM
Also, 2 won't print in the output.
Report Abuse
lampwnage121 is not online. lampwnage121
Joined: 20 Oct 2012
Total Posts: 4285
18 Sep 2014 01:56 PM
Swap your conditionals, it will only check the second one if the first one is false.
Report Abuse
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 02:00 PM
I'm confused, I used a lot of wiki.
Report Abuse
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 02:05 PM
Another thing, 1 prints until 17:30 (1050)
Report Abuse
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 02:09 PM
help
Report Abuse
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 02:11 PM
pleh
Report Abuse
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 02:23 PM
pls
Report Abuse
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 03:08 PM
pls
Report Abuse
YoshiDino123 is not online. YoshiDino123
Joined: 26 Mar 2012
Total Posts: 1045
18 Sep 2014 03:30 PM
pls
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