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
 

easy script 100 robux

Previous Thread :: Next Thread 
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
11 Jul 2016 10:40 AM
probably u can find in free models

I need a day/night cycle that turns on global shadows at night and turns off global shadows during the day


Report Abuse
doggy00 is not online. doggy00
Joined: 11 Jan 2011
Total Posts: 3571
11 Jul 2016 10:51 AM
I don't want robux but here.

l = game.Lighting
n = 4 --time passed per wait unit (in minutes)

while true do
local a = game.Lighting:GetMinutesAfterMidnight()
wait(.5) --time to wait until n is added to the current time
l:SetMinutesAfterMidnight(a+n)
if a > 3600*6 and a < 3600*18 then
l.GlobalShadows = false
else
l.GlobalShadows = true
end
end


--game.Players.doggy00.Life:remove() error- Life is not a valid member of Player
Report Abuse
025110 is not online. 025110
Joined: 23 Nov 2012
Total Posts: 57661
11 Jul 2016 11:14 AM
thanks doggy but GlobalShades never changes, just stays as true/false


Report Abuse
doggy00 is not online. doggy00
Joined: 11 Jan 2011
Total Posts: 3571
11 Jul 2016 03:11 PM
TimeOfDay uses a weird number layout I'm not entirely used to, but 3600*1 is an hour and so on, or should be, not sure why it didn't work, most likely because I'm stupid.


--game.Players.doggy00.Life:remove() error- Life is not a valid member of Player
Report Abuse
calvin56 is not online. calvin56
Joined: 18 May 2007
Total Posts: 784
11 Jul 2016 08:01 PM
look up crossroads day night script in fms

then make a script in workspace with this in it

if game.Lighting.TimeOfDay => "7:00:00" then
game.Lighting.GlobalShadows = true
end

if game.Lighting.TimeOfDay => "06:00:00" then
game.Lighting.GlobalShadows = false
end
Report Abuse
Soybeen is not online. Soybeen
Joined: 17 Feb 2010
Total Posts: 21462
11 Jul 2016 08:08 PM
mafterm = (10*60) -- starting time, 10 o'clock
l = game.Lighting
interval = (.6)

while true do
mafterm = mafterm+1
l:SetMinutesAfterMidnight(mafterm)
if game.Lighting:GetMinutesAfterMidnight() == 6 * 60 then -- at 6am
game.Lighting.GlobalShadows = true
elseif game.Lighting:GetMinutesAfterMidnight() == 17 * 60 then
game.Lighting.GlobalShadows = false
end
wait(interval)
end


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