Coding Global Background
Coding Global

whats the problem with this

Archived a year ago
5 messages
2 members
Created a year ago
Updated a year ago
Open in Discord
A
Imperial Azvran
Script Kiddie!
the system is reversed meaning when i look underwater it gets rid of the blur and CC but when ur lookin at land they are on which it is meant to be not on and be on underwater
script:
local runS = game:GetService("RunService")
local Light = game:GetService("Lighting")

local cam = workspace:WaitForChild("Camera")
local water = workspace:WaitForChild("WaterBlur")
local UNDB = Light:WaitForChild("UWB")
local UNDCC = Light:WaitForChild("uwcc")

runS.Stepped:Connect(function()
    local camV3 = water.CFrame:PointToObjectSpace(cam.CFrame.Position)
    local CamUnder = (math.abs(camV3.X) < water.Size.X / 2)
        and (math.abs(camV3.Y) < water.Size.Y / 2)
        and (math.abs(camV3.Z) < water.Size.Z / 2)
    
    
    UNDB.Enabled = CamUnder
    UNDCC.Enabled = CamUnder
    
    
end)

Replies (5)