#Turrain gen
1 messages · Page 1 of 1 (latest)
minecraft ripoff
local Z = 50
CX = 5
CY = 5
local OFFSET_X = 0
local OFFSET_Z = 0
PaPl = game.ServerStorage.Part
sizeX = PaPl.Size.X
sizeY = PaPl.Size.Y
sizeZ = PaPl.Size.Z
local grid = {}
res = 200
fre = 2
hi = 150
change = hi
for iX=1,CX do
OFFSET_X += X
for iY=1,CY do
--hi = math.random(25,50)
OFFSET_Z += Z
for x = 1, X do
grid[x] = {}
for z = 1, Z do
grid[x][z] = math.noise((x+OFFSET_X)/resfre, (z+OFFSET_Z)/resfre,0)change
end
end
task.wait()
for x = 1, X do
for z = 1, Z do
local yPos = grid[x][z]
local part = Instance.new("Part")
part.Material = Enum.Material.SmoothPlastic
part.Anchored = true
if yPos < -15 then
part.BrickColor = BrickColor.new("Grey")
elseif yPos < -10 then
part.BrickColor = BrickColor.new("Brown")
elseif yPos < -5 then
part.BrickColor = BrickColor.new("Cool yellow")
else
part.BrickColor = BrickColor.new("Bright green")
end
part.Position = Vector3.new((xsizeX)+(OFFSET_XsizeX)-X, (math.round(yPossizeY))sizeY, (zsizeX)+(OFFSET_Z*sizeX)-Z)
part.Size = Vector3.new(sizeX, sizeY, sizeZ)
part.Parent = workspace.Gen
end
end
end
OFFSET_Z = 0
end ```
the part in ServerStorage size is set to 0.5,0.5,0.5
@digital notch
This looks fine to me
Whats the issue?
Hey there! This is my first development video that I have uploaded on to YouTube, so please, give me criticism on the video. Don't be afraid to make me cry.
Anyways, we will be looking at the basics of Perlin Noise in this video, and how to use Perlin Noise in order to make a fog screen. "What is a fog screen?", I hear you saying. Watch the vid...
Try this
okay