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

Time and Ambient ?

Asked by
korj5 0
9 years ago
print("Korj5's Time")

while true do

wait(1)
game.Lighting.TimeOfDay = "1:00:00"
game.Lighting.OutdoorAmbient.Vector3.new(0,0,0)

wait(3)
game.Lighting.TimeOfDay = "12:00:00"
game.Lighting.OutdoorAmbient.Vector3.new(127,127,127)
end

I believe I'm missing something... I am learning scripting now.

1 answer

Log in to vote
0
Answered by 9 years ago

Ambient does not use Vector3, it uses Color3

Vector3 is positions in the workspace, Color3 is completely different (used mainly in GUI's and stuff of that nature)

When using Color3 you also need to divide every number in it by 255, to get the desired color.

print("Korj5's Time")

while true do

wait(1)
game.Lighting.TimeOfDay = "1:00:00"
game.Lighting.OutdoorAmbient=Color3.new(0/255,0/255,0/255)

wait(3)
game.Lighting.TimeOfDay = "12:00:00"
game.Lighting.OutdoorAmbient=Color3.new(127/255,127/255,127/255)
end

More on Color3

More on Vector3

0
Oh perfect! Thank you, I'm starting experience with my scripting heh. korj5 0 — 9y
0
The wiki as a nice place to find anything you need, as well as youtube videos. Tempestatem 884 — 9y
Ad

Answer this question