-It is a lot more customizable. There are some parameters you can modify to fit better your experience, and if you are a scripter, you can customize it even more.
How to use it:
-There will be a local script called water part. Place that in starterCharcterScripts. In this file I use a water part made by @EtiTheSpirit which has an animated texture.
-It is really simple to configure. With this plugin, you make a tag called the same as this value of this property of the script: and then mark all the parts you want to be able to swim in with the plugin.
-There are 3 other configurations. I don’t recommend to modify anything inside the script.
—First you got this. . It is the speed the character will go up when being idle inside the water.
—Second you have this other property. . It is the speed the character will go up when pressing spacebar/touching the right lower part of the screen on mobile/buttonA in xbox.
—Lastly the swim speed, pretty self-explainatory.
-Remember the parts you use have to be can collide false.
About it
-IMPORTANT NOTE: There is currently a bug with tools. I’m not sure if I will be able to fix that tho, since the bug report team ignored me.
-Works with both rig types.
-It works for all platforms.
-If you want the detection to work well, only use it with square shapes that are not rotated. Showcase
-Here’s a couple videos about it:
Updates
–Made it so the water parts are the ones you tag in collection service. Works with r6 and r15 7/7/2021.
–Added attributes and ability to go up using jump input.
–Added swim speed attribute. 9/7/2021
–Changed some things in the script to make it a lot shorter and fixed this bug
–Fixed this bug:
–Changed the detection system. 25/8/21. Now lets you accurately detect water shapes while using squares(i.e. holes inside the water, for example a cave)
This looks really nice! I’m not at my computer right now so I can’t see the test file, but does this use mesh deformation waves? If not, that would make it 2000% better, if it already uses mesh deformation, I will definitely try it out in my current project!
Just a small suggestion, you should make an automatic script to do this using CollectionService. That way, users could just use the Tag Editor plugin and tag parts as water, and not have to go in and edit a script.
To elaborate, you could have a variable that stores a string, which would be the CollectionService tag. It could be set to something like “WaterPart” by default, but having it as a variable would allow developers to change the tag easily from the top of the script, in case the name of the tag is already in use in their game.
Not sure if this is 100% possible or not, but if it’s possible can you make it so the player will rise faster when holding down space/jump like the actual roblox water? I find myself (and others) having a bit of issues getting out of the water because we have to swim up to get out when it would be a ton better if you can just hold a button on your keyboard or screen.
Issue example:
Sorry if it’s difficult to notice, but it’s pretty easy to notice when you play yourself.
Just added that plus properties you can modify for the speed of it. I had to replace and write lots of lines of code so there will probably be some bugs. If you find any please report them here.
Just an extra side note, uploading this as a model and updating the model when you update the script would be much more convenient if a developer wants to get the latest update of this script. It will be a lot less tedious in the long run.
this is really cool and useful! I’ll definitely look inside the script to see how you did it (since I’ve also been trying to making a water part, but failed in every way trying). Also with this, literally anyone can recreate flood escape 2 now lol
Hey, just figured something out, I wanted to let you know about it, @gpm231 .
When the player enters the water, any previous Atmosphere or Sky effect will be deleted. This could be an issue if someone made a world with a specific skybox or atmosphere had a more “orange” atmosphere. When the player leaves the water, these effects are deleted, and there won’t be an atmosphere effect or skybox in the Lighting section of the game anymore.
Might want to look into how to stop this correctly. Maybe make it so it will create a folder in ReplicatedStorage locally, and will move the old Atmosphere + Sky into the Folder when they enter the water, and then move it back to the sky, deleting the water atmosphere + sky afterwards.
Thanks again for the nice script. No other issues so far!
Will this work on a round-based game? I tried making a map with swimmable water but once the round ends, the water left in the workspace (the map have been removed but the water, not)
until this problem is solved, I would suggest teleporting the water somewhere secretive in the map whenever the round ends. You can also choose to change the size of the water when the round ends, but that’s up to you
It will work, it isn’t like roblox’s smooth terrain (I think that is what you are trying to say since smooth terrain doesn’t get deleted the same way parts do).