I want that when it's daytime, one music plays. When it's nighttime - other music plays. I tried to script it but it didn't work. Any help please?
P.S. I have Day/Night script so nightime is possible.
--Sound Test
local Time = game.Workspace.Lighting.TimeOfDay
local SoundOne = game.Workspace.Music
local SoundTwo = game.Workspace.Another
while true do
if Time == 06:00:00 then
SoundOne:Stop()
SoundTwo:Play()
end
if Time == 22:00:00 then
SoundTwo:Stop()
SoundOne:Play()
end
end

3 comments
output?
You should always add a "wait(0.001)" to loops like this
wait(0.001) won't work. wait(0.03) is the fastest it can be.