Realistic water flow not working

I’m trying to make realistic water flow, but I’m stuck and I get no errors.

local function getmidcframe(cframe1, cframe2)
	local cframe = cframe1:lerp(cframe2,0.5) 
	return cframe
end

while true do
	local c = Vector3.new(workspace.Water.WaterMain.Position.X, 0, 0)
	local d = Vector3.new(workspace.Water.WaterMini.Position.X, 0, 0)
	local a = Vector3.new(0, workspace.Water.WaterMain.Position.Y, 0)
	local b = Vector3.new(0, workspace.Water.WaterMini.Position.Y, 0)
	local e = Vector3.new(0, 0, workspace.Water.WaterMain.Position.Z)
	local f = Vector3.new(0, 0, workspace.Water.WaterMini.Position.Z)
	local size = Vector3.new((c - d).magnitude,(a - b).magnitude,(e - f).magnitude)
	local WorkS = game.Workspace
	WorkS.Terrain:FillBlock(getmidcframe(workspace.Water.WaterMini.CFrame,workspace.Water.WaterMain.CFrame),size,Enum.Material.Water)
	wait(0.1)
	WorkS.Terrain:Clear()
end
1 Like

Can’t tell from the script how that’s supposed to give “realistic water flow”. Could you describe what you want in more detail, perhaps with some illustrations or something?

1 Like

Basically, I have 2 unanchored spheres that will tell the positions of the water, so it would fill in the space between the two spheres.