Alright so I am working on a cool visualizer for my game. I already have it working. I am working on a system on fetching the children. You’ll never believe it guys. It DOESN’T fetch the children!!
game.Loaded:Wait(2)
local parts = {}
local gridSize = 10
local partSize = Vector3.new(10, 1, 10)
local sineFrequency = 0.5 -- frequency of the sine wave
local amplitude = 0.25 -- amplitude of the sine wave
local TweenService = game:GetService('TweenService')
local SoundService = game:GetService('SoundService')
local RunService = game:GetService('RunService')
local sound = Instance.new('Sound')
sound.SoundId = 'rbxassetid://5410086218'
sound.Looped = true
sound.Parent = SoundService
sound.Volume = 0.07
sound:Play()
local oldPlaybackLoudness = (sound.PlaybackLoudness / 350)
local newPlaybackLoudness = (sound.PlaybackLoudness / 350)
local Visualizer = workspace:WaitForChild('Visualizer')
if Visualizer then
print('Visualizer is not nil')
else
print('Somehow visualizer is nil')
end
print(Visualizer:GetChildren())
for _, Part in pairs(Visualizer:GetChildren()) do
print('running :>')
local x, y = Part.Name:match("(%d)_(%d)")
print(x, y)
x = tonumber(x)
y = tonumber(y)
if x and y then
parts[x][y] = Part
end
end
The children CLEARLY aren’t nil and are still childed to that ‘Visualizer’ model.