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

game.Lighting.ClockTime not changing from script?

Asked by
Donut792 216 Moderation Voter
5 years ago

ok so i was trying to change the clock time with a script and with that script it will say that it changes the time when you dont see anything happen even if you have clocktime clicked on in the explorer but the script will print out that it happened

local f = game.Lighting.ClockTime --set at 16

repeat

f = f + 1

print(f) -- this prints out 16 then 17 then 18 and so on

until f == 23

print("dark") -- prints out

humanoidroots.Anchored = true

wait(3)

humanoidroots.Anchored = false

repeat

f = f - 1

print(f) -- 22 then 21 20 19 18 17 16

until f == 16

print("light") -- also prints but nothing physically changes to the games lighting or the lighting value and this is a server script 
0
u r using values and not references User#24403 69 — 5y
1
have f = game.Lighting instead then use f.ClockTime = f.ClockTime -1 so that it references to the clock time not just the number 16 wwwdanielwww 5 — 5y
0
alright thank you guys Donut792 216 — 5y
0
worked out thank you guys so much Donut792 216 — 5y

Answer this question