New update. While I was working on fixing the tool bug I came up with a new detection system.
Do you mind updating the guide? I think the current one is outdated.
It’s not outdated, if you have any trouble setting it up, you can ask me in dms.
I don’t really understand how to add this, can you give a better tutorial? so I can understand this so I can add this to my game, thank you
Edit: Okay, sorry my bad, I was able to add the water in my game but I suggest you to give us a better understanding how to add this, thank you and stay safe
does this also support parts?
Having the ability for parts to float on the water would be nifty
No, it doesn’t support parts, but you can make a custom system with vector forces to make a part kinda stay on top of the water
Unsure if the latest update fixes this issue (it might but I don’t see this bit of code at the top to help combat this issue)
but it appears that Roblox games with a lot of content will actually prevent the water from working at all until the user resets. Some people will swim, and others will end up walking as normal because the script loaded before they fully loaded. To fix this issue, I recommend adding this:
if not game:IsLoaded() then
game.Loaded:Wait()
end
to this section here, inbetween your credit and the variables
--Contact:
-Roblox: gpm231
-Twitter: @gpm231RBLX
-Discord: gpm231#9505
--]]
-- Wait for client to fully load in assets
if not game:IsLoaded() then
game.Loaded:Wait()
end
local conActSer = game:GetService("ContextActionService")
local colSer = game:GetService("CollectionService")
local lighting = game:GetService("Lighting")
I know developers can easily add this in, but it would be awesome if you featured it by default. It doesn’t seem to cause any issues in the long run of things, and it 3 lines of code extra. Then again, your choice!
I have 1 question. Your script have 2 detectors - V1 and V2. I want know, why you cancelled inside detection of V1 detector, and maked V2, which don’t work for rotated or non-cubic parts?
For me, this works well, for rotated and non cubic-parts, even if there’s any gap between 2 parts:
local function checkIfDetectorInWanter(detector)
--Outside raycasts.
local skyRayCastPoint = detector.Position + Vector3.new(0, rayCastDistance, 0)
local voidRayCastPoint = detector.Position - Vector3.new(0, rayCastDistance, 0)
local skyRayCastResultO = workspace:Raycast(skyRayCastPoint, Vector3.new(0, -rayCastDistance, 0), generalRayParams)
local voidRayCastResultO = workspace:Raycast(voidRayCastPoint, Vector3.new(0, rayCastDistance, 0), generalRayParams)
--Inside raycasts --//-- Currently useless, this was an attempt to improve the detection.
local skyRayCastResultI = workspace:Raycast(detector.Position, Vector3.new(0, rayCastDistance, 0), generalRayParams)
local voidRayCastResultI = workspace:Raycast(detector.Position, Vector3.new(0, -rayCastDistance, 0), generalRayParams)
------------------My improvement------------------
if skyRayCastResultO and voidRayCastResultO and not (skyRayCastResultI and voidRayCastResultI) then
return true
else
return false
end
end
Maybe, I just didn’t notice something?
Sorry for the late reply. V1 doesn’t work with holes inside water. In the V2 version of this project the detection will be a lot better than those 2 systems
Hm. My checker works even with holes in water.
Send me a place file with that
By real, I found 1 bug, while creating place for you, which I’ll try fix. Water won’t be detected if there above and below it any water parts. Shouldn’t be hard to fix, but not guarantee.
I saw that the new version of the High performance water part released and it’s pretty confusing to me. Would you mind explaining it?
I accidentally published the new version but its not finished
lol, well I hope there will be the finished version with a post about it in some time =)
Hey, how do I get this script to work? I’m new to scripting and would like to make a few water areas in a little world I’m working on…
Firstly, you should use version 2.0, and secondly there is a tutorial on how to set it up in the post, if you have any doubts about that you can ask in the replies or dm me on discord (I prefer discord)
Ah, I didn’t see the tutorial there for some reason…
Thanks! I look forward to testing this out