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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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
|
  |
| 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 |
|
|