#whats the problem with this

5 messages · Page 1 of 1 (latest)

chilly zodiac
#

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)
warped wraith
#

Thanks for your question :clap:, if someone gives you an answer it would be great if you thanked them with a :white_check_mark: in response. This response will earn you both points for special roles on this server.

chilly zodiac
#

It doesn’t work what’s wrong