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?