Working Subwoofer Positioning

Yea I got an issue, Im trying to make working subwoofer but for some reason it looks wrong…

instead it should go down instead of clipping up

local Part = script.Parent
local Sound = script.Parent.Parent.Sound

Sound:Play()
-- animate the subwoofer
while true do
	local loud = Sound.PlaybackLoudness * 0.002
	Part.Position = script.Parent.Position
	Part.Size = Vector3.new(loud + math.random(0,.1) ,1.36,1.36)
	wait()
end
2 Likes

You could try something like this, I didn’t test it so if the orientation is wrong let me know

local loud = (Sound.PlaybackLoudness * 0.002) + math.random(0, .1)
Part.Size = Vector3.new(loud, 1.36, 1.36)
Part.CFrame = script.Parent.CFrame * CFrame.new(0, -loud / 2, 0) * CFrame.new(0, 0, math.rad(-90))

Ummmm, It just flew away from the subwoofer LOL

Oh, script.Parent is the part itself, can you screenshot the hierarchy of the subwoofer model?

image

Yea Im planning to put this in a moving object too.

Ignore meshPart

try this

local loud = (Sound.PlaybackLoudness * 0.002) + math.random(0, .1)
Part.Size = Vector3.new(loud, 1.36, 1.36)
Part.CFrame = script.Parent.Parent.Position.CFrame * CFrame.new(0, -loud / 2, 0) * CFrame.new(0, 0, math.rad(-90))

image

EEEEEEEEEEE

Sorry, idk which way your mesh is oriented Lol maybe this is the one

Part.CFrame = script.Parent.Parent.Position.CFrame * CFrame.new(0, -loud / 2, 0)
1 Like

Almost I just rotated the position brick -90 AAA

I moved up the position brick a bit um…

it looks like the z axis is moving as well

okokok

i think I almost

I gOT IT

If you haven’t fixed it yet, change -loud / 2 to loud / 2 in the one you have in your last post