I am trying to make a simple terrain generator, but whenever I call math. Noise with the position on the noise map, I just get the number 8 returned, no matter what numbers I input into the function.
Here is the code for the module script that I made to handle it
local PN = {}
function PN.Generate(SizeX, SizeZ, Seed)
for x = 0, SizeX, 1 do
for z = 0, SizeZ, 1 do
local noiseScale = 128
local currentHeight = math.noise(SizeX+Seed, 0.0, SizeZ+Seed)
print(currentHeight)
CreatePart(x, z, currentHeight)
end
end
end
function CreatePart(XPos, ZPos, YHeight)
local Part = Instance.new("Part")
Part.Anchored = true
Part.Size = Vector3.new(10, YHeight, 10)
Part.Position = Vector3.new(XPos*10, 0, ZPos*10)
Part.Parent = workspace.PartStorage
end
return PN