I’m trying to make a swimmable part for a friend’s game that can be copied with HD Admin’s Building Tools. I’ve looked all over the DevForum, but no matter what I try, I just cannot seem to get this to work. I tried using this script, but that didn’t work for me even though I followed the instructions, and that only checks for Y level and not collision with the part anyway which means it wouldn’t work for my use case. I don’t know much about scripting, so I couldn’t figure out how to code it myself. All I could figure out was that the humanoid state has to be changed to Swimming and GettingUp has to be disabled.
Try creating zones with Parts and their Script that is via OnTouch (be sure to use local boolean like for example, debounce as commonly referred to avoid OnTouch spam, and verify the Humanoid Properties using If Statements.), one for enabling Swimming and disabling GettingUp and vice versa, this way you’ll have a registry for parts that can activate & disable swimming physics.
I haven’t tried this before myself but this is the logic I’d use to make an attempt at what you’re trying to achieve. Let me know if this works, if not then try investigating the predefined humanoid properties as activation for swimming might not be as simple as true and false of these properties, which of course’ll make things more difficult.
Hope this intel helps. ![]()
This problem was mentioned three years ago. A very easy solution is using the ZonePlus module. You can construct a new zone for each swimabble part and trigger the swimming state once the localPlayerEntered event fires.
P.S. It might be a good idea to ditch the BodyVelocity construction in favour of LinearVelocity as it has been quite some time since it has been deprecated.