Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Why does my smooth terrain generator not work?

Asked by 9 years ago

I was eager to find a smooth terrain generator, so i went here and searched smooth terrain. I found this guy's script that had problems with holes, but i took it anyway. I added a few stuff to it, but now it doesn't work. Here's my script:

function smoothTerrain()
    --'loaded' is just a Model filled with all the correctly colored and sized Parts.
    for i, part in ipairs(loaded:GetChildren()) do
        if part.BrickColor == BrickColor.Blue() then
            workspace.Terrain:FillBlock(part.CFrame, part.Size, "Water")
        elseif part.BrickColor == BrickColor.Green() then
            local shape = math.random(1, 2)
            if shape == 1 then
                workspace.Terrain:FillBlock(part.CFrame, part.Size, "Grass")
            else
                workspace.Terrain:FillBall(part.Position, part.Size.Y/2, "Grass")
            end                        -- editing begins here
        elseif part.BrickColor == BrickColor.Yellow() then

            workspace.Terrain:FillBlock(part.CFrame, part.Size, "Sand")
elseif part.BrickColor == BrickColor.Red then
        workspace.Terrain:FillBlock(part.CFrame, part.Size, "CrackedLava")
elseif part.BrickColor == BrickColor.new("Medium Stone Grey") then
    workspace.Terrain:FillBlock(part.CFrame, part.Size, "Slate")
elseif part.BrickColor == BrickColor.new("Dark Stone Grey") then
    workspace.Terrain:FillBlock(part.CFrame, part.Size, "Rock")
        end
    end
end

Does anyone know what i am doing wrong? Thanks so much. Troy

0
Hey, this looks like Redbullusa's script. EzraNehemiah_TF2 3552 — 9y

1 answer

Log in to vote
0
Answered by 9 years ago

Well You Never Specified what loaded is in game so try adding this,

local loaded = workspace.loaded

Thats the only thing i can see, if you still have problems please leave a comment. hope this helps

0
Thanks! I'll make that edit. TroytheDestroyer 75 — 9y
0
No problem, if you have anyother issues let me know ioutragous 0 — 9y
0
Wait, the guy i got the script from didn't specify loaded either, and i didn't put a part in workspace called loaded. TroytheDestroyer 75 — 9y
0
Then that line of code is un neccicary, ioutragous 0 — 9y
View all comments (3 more)
0
Oh, i put loaded and put all my terrain bricks in there, but it still won't work. TroytheDestroyer 75 — 9y
0
It may just be a problem with roblox then... ioutragous 0 — 9y
0
Change your elseifs to if, that might be a issue aswell ioutragous 0 — 9y
Ad

Answer this question