local tiles = workspace.Tiles
local function generate(p)
local seed = math.random(1, 50)
local frequency = p
local power = 4
local size = 9
for _, v in pairs(tiles:GetChildren()) do
v:Destroy()
end
for x = 1, size do
for z = 1, size do
local y1 = math.noise((x * frequency) / size, (z * frequency) / size, seed)
local y2 = math.noise((x * frequency * 0.125) / size, (z * frequency * 0.125) / size, seed)
local y3 = math.noise((x * frequency * 5) / size,(z * frequency * 5) / size, seed)
local y = (y1 * y2 * power * power) + y3
local block = Instance.new("Part")
block.Name = "Block"
block.Transparency = 0.75
block.Anchored = true
block.CanCollide = false
block.Material = Enum.Material.SmoothPlastic
block.Size = Vector3.new(15, 50, 15)
block.CFrame = CFrame.new(x * 5, y, z * 5) * CFrame.Angles(0, 0, 0)
block.Parent = tiles
end
end
game:GetService("RunService").Heartbeat:Wait()
end
while true do
for i = 1, 10, 0.1 do
generate(i)
wait(0.1)
end
end
With some work with audio visualiser I’m pretty sure you can get the sounds PlaybackLoudness
PlaybackLoudness returns the actual sound of the music being played. Volume doesn’t affect it but Sound Effects do.
This is how I did my audio visualiser very simple but works very well
If you’re playing music on the client use RenderStepped otherwise put it in a while wait()/true do loop
local sound = -- define where the sound is
game:GetService("RunService").RenderStepped:Connect(function()
game.Part1.Size = Vector3.new(2, sound.PlaybackLoudness/20, 2)
end)
Instead of having p affect the seed, frequency or anything else, try adding math.sin(p) to the 3rd parameter of math.noise, and have p vary from -math.pi to math.pi, like so:
while true do
for i = 0, 1, 0.1 do
generate( -math.pi + math.pi * 2 * i )
wait(0.1)
end
end