Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

Visualizer script not working as intended? (again)

Asked by
3F1VE 257 Moderation Voter
3 years ago

So I made a script that uses the BasePart:Resize() function and I used it on the top face according to a Sound.PlaybackLoudness but instead, it only resizes that face when the Sound.PlaybackLoudness is at its peak and keeps resizing.

local s = workspace.Sound
wait(2)
while wait() do
    for i,p in pairs(workspace.q:GetChildren()) do
        p:Resize(Enum.NormalId.Top,s.PlaybackLoudness/200) --I want to use this but it scales up infinitely
        -- I used p.Size =  Vector3.new(1,s.PlaybackLoudness/math.random(100,250),1) before this
        end
end

If you can help I will gladly appreciate it!

0
Currently I'm using the Vector3 method as a replacement. 3F1VE 257 — 3y
0
Honestly using Vector3 is easier to manage. For p:Resize to work you would need to create a limit on the size itself from 0 to 1-100 etc,. GetGlobals 343 — 3y
0
And then do math to decide if it should shrink or large and ontop to make sure it doesn't exceed your limits. GetGlobals 343 — 3y

Answer this question