Hello developers! I am trying to create an infinite beach. Here is the code:
local repStor = game:GetService("ReplicatedStorage")
local Land = repStor:WaitForChild("Land0")
local new_land = Land:Clone()
new_land.Parent = game.Workspace
new_land.Name = "Land1"
maxland = 10
for i = 1, maxland do -- ik for loop will not make it infinite. I am doing this so it won't crash. I will change it to while when it is done.
print("Working", i)
local oldLand = game.Workspace:FindFirstChild("Land"..i)
local new_new_land = Land:Clone()
new_new_land.Name = "Land"..i + 1
new_new_land.Parent = game.Workspace
new_new_land:SetPrimaryPartCFrame(oldLand.ThePrimaryPart.Cframe * CFrame.new(30, 0, 0))
end
I am coming with this error:
I will also keep trying things on my end.
If you can help, please let me know. Thanks, WE.