I am trying to make a game which is based mostly underwater, to which I am having issues creating. In fishing simulator they use water similar to how I want to create my water, and I was wondering how I could replicate this into my game.
robloxapp-20211027-1445375.wmv (974.1 KB)
Try looking a this tutorial. You will also need to make the player able to swim in it which this might help with.
Here is a simple script that can be added to a part in Roblox to make it behave like terrain water:
local part = script.Parent
part.Anchored = true
part.CanCollide = false
part.Transparency = 0.7
local water = Instance.new("WaterWave", part)
water.Density = 0.2
water.Speed = 0.1
water.Size = 10
This script sets the part’s Anchored property to true, so it will not be affected by gravity. It also sets the CanCollide property to false, so players will be able to walk through the part as if it were water. The Transparency property is set to 0.7 to give the part a translucent appearance.
Next, the script creates a new WaterWave object and parent it to the part. This will give the part a water-like animation. The Density and Speed properties of the WaterWave object can be adjusted to change the appearance of the water. The Size property can be used to adjust the size of the wave.
Please note that this script will not prevent players from walking on the part. You need to set the Part.Locked property to true, to prevent players from walking on it.