You will have to make some islands first. Since they will probably be made of more than one brick, you could move them using :SetPrimaryPartCFrame() for Models.
Here’s a quick and dirty edit:
local clouds = {}
local islands = game:GetService("ReplicatedStorage").Islands:GetChildren()
for i = 1,10 do --make 10 clouds
local cloud = Instance.new("Part")
cloud.Anchored = true
cloud.CanCollide = false
cloud.BrickColor = BrickColor.White()
cloud.Position = Vector3.new(math.random(-500,500), 100, math.random(-1000,1000))
cloud.Size = Vector3.new(100, 10, 100)
cloud.BottomSurface = Enum.SurfaceType.Smooth
cloud.TopSurface = Enum.SurfaceType.Smooth
cloud.Parent = workspace.CurrentCamera
table.insert(clouds, cloud)
end
spawn(function()
while wait(math.random(30, 90)) do --make an island every 30 to 90 seconds
local island = islands[math.random(#islands)]:Clone()
local Y= island.PrimaryPart.Size.Y/2
local X = math.random(250,1000)*(math.random(0,1)-0.5)*2
island:SetPrimaryPartCFrame(CFrame.new(X, Y, -1000))
island.Parent = workspace.CurrentCamera
spawn(function()
for Z = -1000, 1000 do
wait()
island:SetPrimaryPartCFrame(CFrame.new(X, Y, Z))
end
island:Destroy()
end)
end
end)
while wait() do
for _, cloud in ipairs(clouds) do
cloud.Position = cloud.Position + Vector3.new(0, 0, 1)
if cloud.Position.Z >= 1000 then
cloud.Position = Vector3.new(math.random(-500,500), cloud.Position.Y, -1000)
end
end
end
I also made one small change to the cloud moving section so that you won’t be seeing the same cloud patterns all the time.
In order for this to work, you need to have a Folder called “Islands” in ReplicatedStorage. Inside this folder you can have any number of different island Models (name them anything you want).
For the islands themselves, you must set the Model’s PrimaryPart to a part that is touching the ocean (the script assumes that sea level is Y = 0).
One last note: the script also assumes that the ship is near or at the origin (0,0,0). The islands move at most 250 studs from the origin. If you want to change this, you will have to edit the numbers on this line:
local X = math.random(250,1000)*(math.random(0,1)-0.5)*2 --range is 250 to 1000 studs