I have no idea why this is happening. Everything about the script works fine, just everytime a tool touches the water, the water shoots up. Here it is:
local brick = script.Parent
brick.Position=Vector3.new(-35.5, 1.301, -12)
waveSpeed = 0.1
waveHeight = 0.005
while wait(0.1) do
for I=1,20 do
brick.Position=brick.Position+Vector3.new(0,-waveHeight,0) --Lower water
wait(waveSpeed)
end
wait(1)
for I=1,20 do
brick.Position=brick.Position+Vector3.new(0,waveHeight,0) --Raise Water
wait(waveSpeed)
end
brick.Position=Vector3.new(-35.5, 1.301, -12)
wait(1)
end

1 comment
there is no touch function in this