Is this a good implementation for night vision?

So I made a night vision ability, but I’m not sure if it’s actually a good way to do it, because
it seems laggy.

It’s not the green night vision stuff.

local effect = game.Lighting
local color = game.Lighting.ColorCorrection
local fog = game.Lighting.Atmosphere
local isActive = false
local nightVisionKeyBind = "F"


UIS.InputBegan:Connect(function(input, gameProcessedEvent)
	if(isActive == false and input.KeyCode == Enum.KeyCode[nightVisionKeyBind]) then
		isActive = true
		effect.Brightness = 30
		effect.GlobalShadows = false
		color.TintColor = Color3.fromRGB(255, 112, 114)
		fog.Density = 0
	else if(isActive == true and input.KeyCode == Enum.KeyCode[nightVisionKeyBind]) then
			isActive = false
			effect.Brightness = 2
			fog.Density = 0.5
			effect.GlobalShadows = true
			color.TintColor = Color3.fromRGB(255, 255, 255)
		end
	end
end)

What do you think?

I think it works pretty well, From the video shown it doesn’t seem too laggy.

1 Like

idk, the transition from night vision to normal vision seems a bit laggy. Might be me tho

1 Like

It does lag a tiny bit but It might be a Roblox engine limitation too, so I’m not sure there’s much you can do, aside from adding a GUI fade to hide the lag

1 Like