Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

[SOLVED] Nightvision script making my game look like toxic waste?

Asked by 4 years ago
Edited 4 years ago

So I coded a script myself to edit the lighting and currentcamera to make nightvision

edit: i solved this by myself sorry for wasting time

wait(0.15)

local cam = workspace.CurrentCamera
local light = game.Lighting

script.NightVisionBloom.Parent = cam
script.NightVisionRays.Parent = cam
script.NightVisionCorrection.Parent = cam

light.Brightness = 10
light.ColorShift_Bottom = Color3.new(0,255,0)
light.ColorShift_Top = Color3.new(0,255,0)
light.Technology = Enum.Technology.ShadowMap
light.ExposureCompensation = 0.1
light.ShadowSoftness = 1 -- to soften shadow and darkspots


light.GlobalShadows = true
light.LegacyOutlines = true

but lines 14-17 are weird. instead of just setting colorshift to (0,255,0), it multiplies the colour by whatever there is (e.g: 0,255,0^2) and turns into (0,65025,0), completely messing up the entire screen and turning any object into a green bunch of goop. I don't know why this happens.

thing i've noticed so far: lag spikes

0
I would recommend using a shader instead of changing the lighting. Use color correction. Benbebop 1049 — 4y
0
it doesnt fill in shadows and thats why i use colorshift speedyfox66 237 — 4y
0
looked it up and apparently color3.new only works with numbers from 0-1, try using Color3.fromRGB Benbebop 1049 — 4y

Answer this question