![]() ![]() = 1046×779 81.9 KB Note: The wood size does not match in this example, but you can fix this in the settings of your material. Local didHit = raymodule.raycast(cameraPos, v.Position, raycastParams) every frame, check if we are underwater RaycastParams.FilterDescendantsInstances = water Local raycastParams = RaycastParams.new() Local TINT_UNDERWATER = Color3.new(0, 0.65098, 1)įor i, v in pairs(game.Workspace:GetChildren()) do Local raymodule = require(Modules.raymodule) So one fix might be to ask all of the water blocks, "am I underwater?" And if any say yes, then change the lighting and reverb, but if ALL of them say no, then change it back. ![]() You are checking that you are underwater for each block, and if one says yes, but the next says no, you will essentially be undoing any changes that should be happening. It could be that your logic is fighting with itself. Local ray = require().raycast(.Position, v.Position, parms) I need help debugging this code, i am trying to make an effect where the screen is tinted a blueish color and the reverb is set to bathroom whenever a camera is inside a part named "water", it works for 1 body of water in the game and the rest will not cause the effect to happen, despite it printing for every body of water in the game, im assuming the one it picks to work is the one that is loaded first, but im not sure why only that one registers, it checks for them all but only that one part actually causes it to happen while true doįor i,v in pairs(game.Workspace:GetChildren()) do
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |