I made a simple script that keeps a Depth of Field effect disabled while I edit my game on Studio but enables it when playing the game.
Problem is, it works… only in Studio, for some reason it doesn’t work when playing the actual game. I made a simple else if script with some output printing to see what’s wrong.
And it turns out the script works according to the output, but it actually doesn’t…
(Output says it works but it doesn’t)
The local script is placed in game.StarterPlayer.StarterPlayerScripts, I made it local, that way I can add GUI switches to enable/disable this effect later on. I hope this is not what’s causing this problem!
game.Lighting.DepthOfField.Enabled = false
if game.Lighting.DepthOfField.Enabled == true then
print("Depth of Field Blur has been enabled.")
else
print("ERROR: Depth of Field Blur didn't load.")
end