Simple as can be, when the time of day strikes either 18:00 (6pm) or 6:00 (6am) a sound will be triggered to play; in this case a clock chime.
– side note, Im still new to coding so im not sure if a while true is the best option but it works for lights etc. –
Code:
local chime = script.Parent.Chimes
while true do
wait(0.1)
if game.Lighting:GetMinutesAfterMidnight() > 6.5 * 60 then
chime :Play()
wait(24)
chime :Stop()
end
if game.Lighting:GetMinutesAfterMidnight() > 17.5 * 60 then
chime :Play()
wait(24)
chime :Stop()
end
end