Hello,
I wanted to create a survival game. So I started creating the procedural generation map and wanted to add a falloff filter to the map but I couldn’t find any tutorials or any docs about the falloff filter on the Roblox Developer Docs. And I tried to create the falloff filter by hand but it’s impossible to create.
Here is the code:
for z = 1,200,1 do
for x = 1,200,1 do
local Block = game.ServerStorage.Block:Clone()
Block.Parent = game.Workspace.Map.Blocks
Block.Locked = false
Block.Anchored = true
Block.CanCollide = true
Block.CastShadow = false
Block.Position = Vector3.new(-0.5,0.5,-0.5)
Block.CFrame = Block.CFrame + Vector3.new(x*1,0,z*1)
Block.CFrame = Block.CFrame + Vector3.new(0,math.floor(math.abs(math.noise(x/20,z/20)*10)),0)
if Block.CFrame.Y >= 1.5 then
Block.Material = "Grass"
Block.BrickColor = BrickColor.new("Artichoke")
else
Block.Material = "Slate"
Block.BrickColor = BrickColor.new("Medium stone grey")
end
end
end
for i, v in pairs(game.Workspace.Map.Blocks:GetChildren()) do
if v.CFrame.Y < 1.5 then
local Clone = v:Clone()
Clone.Parent = game.Workspace.Map.Blocks
Clone.Material = "Sand"
Clone.BrickColor = BrickColor.new("Bright blue")
Clone.CFrame = v.CFrame + Vector3.new(0,1,0)
end
end