Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

Time and Ambient ?

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

✓ Accepted answer

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

2 comments

0

Oh perfect! Thank you, I'm starting experience with my scripting heh.

0

The wiki as a nice place to find anything you need, as well as youtube videos.

This discussion is preserved as it was. New answers, comments, and votes are closed.