Hey guys! I haven't attempted scripting in a long while but while I was playing around in studio I ran into the ColorCorrectionEffect. If you don't know what it is yet, it changes the characters view of colors in the game.
Anyhow, I wanted to make a script that put's the ColorCorrection into the CurrentCamera if the players health is above 50. I have been able to put a normal part into the CurrentCamera, however I cannot seem to move, clone, or Instance.new the ColorCorrection into the Current Camera.
Here's what I've scripted. Please note that I actually haven't done much scripting and I'm a noob.
Cc = game.workspace.CurrentCamera
PHP = script.Parent.Humanoid.Health
if PHP>50 then -- If the players health is over 50 then
bob = Instance.new("Part",Cc)
bob.Position = Vector3.new(0, 0, 10)
Gg = game.workspace.Instance.new("ColorCorrectionEffect",Cc)
Gg.Brightness = Brightness.new(-1)
end
So here it is, I can instance a brick into the CurrentCamera, but I can't seem to insert the Colorcorrection.