Okay, well, I found a fix! (not completely finished, though)
for __, Liquid in pairs(workspace.Liquids:GetChildren()) do
local Raycast_Params = RaycastParams.new();
Raycast_Params.FilterType = Enum.RaycastFilterType.Blacklist;
Raycast_Params.FilterDescendantsInstances = {Character};
local RayCast = workspace:Raycast(Camera.CFrame.Position, (Liquid.Position - Camera.CFrame.Position), Raycast_Params);
if (RayCast) and (CameraLiquid == Liquid) then
print("Not in water");
CameraLiquid = nil;
ColorCorrectionEffect.Enabled = false;
Underwater_Ambience:Pause();
DepthOfField_Effect.Enabled = false;
elseif not(RayCast) then
print("In water");
CameraLiquid = Liquid;
ColorCorrectionEffect.TintColor = CameraLiquid:FindFirstChild("Color").Value;
ColorCorrectionEffect.Enabled = true;
DepthOfField_Effect.Enabled = true;
if (Underwater_Ambience.IsPlaying) then return; end
Underwater_Ambience:Play();
end
when two parts intersect, they don’t want to… render the camera?
I’m unsure about how to go on this, what should I do?
Figured it out, all I had to do was search around a little more, I found a forum post on how to get a point in a bounding region, these helped me as well!