hwoagh_a
(moomin)
January 16, 2021, 6:33am
#1
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
heII_ish
(heII_ish)
January 16, 2021, 6:46am
#2
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))
hwoagh_a
(moomin)
January 16, 2021, 6:47am
#3
Ummmm, It just flew away from the subwoofer LOL
heII_ish
(heII_ish)
January 16, 2021, 6:48am
#4
Oh, script.Parent is the part itself, can you screenshot the hierarchy of the subwoofer model?
hwoagh_a
(moomin)
January 16, 2021, 6:49am
#5
Yea Im planning to put this in a moving object too.
Ignore meshPart
heII_ish
(heII_ish)
January 16, 2021, 6:51am
#6
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))
heII_ish
(heII_ish)
January 16, 2021, 6:53am
#8
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
hwoagh_a
(moomin)
January 16, 2021, 6:56am
#9
Almost I just rotated the position brick -90 AAA
hwoagh_a
(moomin)
January 16, 2021, 6:57am
#10
I moved up the position brick a bit um…
it looks like the z axis is moving as well
heII_ish
(heII_ish)
January 16, 2021, 7:35am
#12
If you haven’t fixed it yet, change -loud / 2
to loud / 2
in the one you have in your last post