Can someone help me convert this script so that it works with a plane with bones?
local X,Z = 30,30
local Parts = game.Workspace:FindFirstChild("OceanParts")
if not Parts then
Parts = Instance.new("Folder")
Parts.Parent = game.Workspace
Parts.Name = "OceanParts"
end
local Intensity = 10
local Smoothness = 1000
local Size = 25
local YSize = 35
local YOffset = 20
local Seed = 1
local Speed = 0.5
local function MakePartWithColor(Position)
local Part = Instance.new("Part", Parts)
Part.Anchored = true
Part.Position = Position
Part.Size = Vector3.new(Size,YSize,Size)
Part.Color = Color3.fromRGB(87,127,167)
Part.Material = Enum.Material.Glass
Part.Reflectance = 1
Part.Transparency = 0.5
Part.CastShadow = false
Part.Name = "OceanBlock"
Part.CanCollide = false
end
local function Tween(o,d,g)
local es = Enum.EasingStyle.Linear
game:GetService("TweenService"):Create(o,TweenInfo.new(d,es),g):Play()
end
for x = 1,X do
for z = 1,Z do
local Position = Vector3.new(x*Size,YOffset,z*Size)
MakePartWithColor(Position)
end
end
local gobackwards = false
while true do
for i,v:Part in pairs(Parts:GetChildren()) do
local x,z = v.Position.X,v.Position.Z
local y = ((math.noise((x+Seed)/Smoothness,(z+Seed)/Smoothness) * Intensity)+YOffset)
Tween(v,Speed,{Position = Vector3.new(x,y,z)})
end
Seed += 1
wait(Speed/100)
end