Hey, Im currently making a roleplay game that involves police cars, and i prefer much brighter lights.
During night, it looks very nice, like so:
But during the daytime, everything else around is extremely bright, as shown here.
What do you want to achieve? A working script that toggles the bloom effect ingame, turning on at night around time 17:48:00 and back off at time 06:12:00.
What is the issue? At day, when the bloom effects made for night are applied, it is so bright i might need to see my eye doctor the next time i see it.
What solutions have you tried so far? Ive looked on the developer hub and on google and youtube, but failed to find any scripts or solutions.
I have some basic understanding of scripting so im assuming its something like Lighting.lvrpbloom.Enabled = false?
Edit: this is my second post on this forum so my apologies if this is in a wrong topic, i can change it upon request
local disabletime = “00:00:00” – choose
local enabletime = “00:00:00” – choose
game.Lighting:GetPropertyChanged(“TimeOfDay”):Connect(function()
if game.Lighting.TimeOfDay == disabletime then
bloom.Enabled = false
end
if game.Lighting.TimeOfDay == enabletime then
bloom.Enabled = true
end
end)
I fixed the post marked as a solution. Just make sure you don’t remove any numbers, but you can change them. (I think the problem was that there was a missing 0)
GetPropertyChanged checks when a property of an Instance changes.
Here Script
local bloom = game.Lighting["SPECIFY HERE"]
local disabletime = "00:00:00" -- choose
local enabletime = "00:00:00" -- choose
game.Lighting:GetPropertyChanged("TimeOfDay"):Connect(function()
if game.Lighting.TimeOfDay == disabletime then
bloom.Enabled = false
end
if game.Lighting.TimeOfDay == enabletime then
bloom.Enabled = true
end
end)
What you will have to do code wise is the following:
local bloom = game.Lighting.WhateverItIs
local disabletime = “00:00:00” – choose a specific time (ie 17, 18, 19)
local enabletime = “00:00:00” – choose
game.Lighting:GetPropertyChanged(“TimeOfDay”):Connect(function()
if game.Lighting.ClockTime == disabletime then
bloom.Enabled = false
end
if game.Lighting.ClockTime == enabletime then
bloom.Enabled = true
end
end)
Clock time is a lot better to use as the time changes, it’ll be easier to detect what time it is.