Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

This script is not working because using os.date?

Asked by 4 years ago
Edited 4 years ago

Hello there! I've made a script for a live event using "os.date". I used os.date("*t") to use my local time, CET. The event was programmed for today at 20:00, but at the hour, nothing happened. This is the script:

if os.date("*t")[1] == 2020 and os.date("*t")[2] == 1 and os.date("*t")[3] == 02 and os.date("*t")[4] == 06 and os.date("*t")[5] == 06 and os.date("*t")[6] == 21 and os.date("*t")[7] == 00 and os.date("*t")[8] == 00 then
print("Hello there!")
script.Parent.FountainRotations.Disabled = true
script.Parent.TurnOffMostOutskirts.Disabled = false
script.Parent.TurnOffNormalJets.Disabled = false
script.Parent.TurnOffSpinning.Disabled = false
script.Parent.Nozzles.Center.Center.ParticleEmitter.Enabled = false
script.Parent.Lights.TurnCenterLightsOff.Script.Disabled = false
script.Parent.Nozzles.Sorround.Sorround1.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Sorround.Sorround2.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Sorround.Sorround3.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Sorround.Sorround4.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Inclinated.InsideOut.InclinatedInsideOut1.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Inclinated.InsideOut.InclinatedInsideOut2.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Inclinated.InsideOut.InclinatedInsideOut3.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Inclinated.InsideOut.InclinatedInsideOut4.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Inclinated.OutInside.InclinatedOutInside1.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Inclinated.OutInside.InclinatedOutInside2.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Inclinated.OutInside.InclinatedOutInside3.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Inclinated.OutInside.InclinatedOutInside4.ParticleEmitter.Enabled = false
script.Parent.Lights.TurnInclinatedOutskirtsLightsOff.Script.Disabled = false
script.Parent.Nozzles.Pulverized.Pulverized1.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Pulverized.Pulverized2.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Pulverized.Pulverized3.ParticleEmitter.Enabled = false
script.Parent.Nozzles.Pulverized.Pulverized4.ParticleEmitter.Enabled = false
script.Parent.PylonsAndWater.CentralWater.WaterAmbientalSound.Script.Disabled = true
script.Parent.PylonsAndWater.CentralWater.WaterAmbientalSound.Playing = false
game.Lighting.TimeOfDay = 21
game.Workspace["Day and night"].Disabled = true
--If a nozzle does not appear, it means that only has one size.
    --Center speeds: 250,175,110
    --Inclined inside out speeds: 160,130,50
    --Inclined out inside speeds: 115,100,80,50
    --Outskirts speeds: 75,37.5
    --Sorround speeds: 200,150,100,110,90
    --Normal jets speed: 75,100,125,150...
end

The script isn't complete because it is too long. Is there any error that doesn't allow the script to run?

0
is it in a while loop? and if it is, is the while loop going to run through the code at that exact time? Fad99 286 — 4y

Answer this question