Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local objFogFolder = workspace:WaitForChild("FogObjects")
- local fogScrnSize = 100
- local resolution = 100
- local random = Random.new()
- local freq = math.floor(random:NextNumber(0, 10)) + random:NextNumber(0, 2)
- local amp = math.floor(random:NextNumber(0, 15)) + random:NextNumber(0, 1.645)
- workspace.Baseplate.Position = Vector3.new(0, -24, 0)
- local function getHeight(x, z)
- local noiseHeight = math.noise(x / resolution * freq, z / resolution * freq)
- noiseHeight = math.clamp(noiseHeight, -0.5, 0.5) + 0.5
- return noiseHeight
- end
- for x = 0, fogScrnSize do
- for z = 0, fogScrnSize do
- local part = Instance.new("Part", objFogFolder)
- part.Anchored = true
- part.Size = Vector3.new(1, 1, 1)
- local hgh = getHeight(x, z)
- part.Position = Vector3.new(x, hgh * amp, z)
- part.Color = Color3.new(hgh, hgh, hgh)
- end
- game:GetService("RunService").Heartbeat:Wait()
- end
- print(freq, amp)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement