How would I make my logo bounce to this music?

Hi!
i dont have any examples lol

But the release of my studio’s game is tomorrow! I was wondering how I would make the logo kind of grow in size whenever the music kind of has an increase of volume / bass? Thanks!
The Audio (I will want to change it later)

1 Like

You’d need to use PlaybackLoudness property of the sound. Assuming your logo is circular, try something like this:

local run = game:GetService("RunService")

local logo = script.Parent
local music = workspace.music

local minSize = 0.3  -- Minimum size of the logo
local maxSize = 0.7  -- Maximum size of the logo
local smoothness = 0.05

local function ResizeLogo()
	local loudness = math.clamp(music.PlaybackLoudness / 1000, minSize, maxSize)
	logo:TweenSize(UDim2.fromScale(loudness, loudness), Enum.EasingDirection.In, Enum.EasingStyle.Linear, smoothness, true)
end


run:BindToRenderStep('ResizeLogo', Enum.RenderPriority.Last.Value, ResizeLogo)

PlaybackLoudness returns a number from 0 to 1000 indicating how loud the Sound is currently playing back.

6 Likes

Hm, didn’t work. I didn’t configure the image yet, but still.

*omg youtube why did that render as an ear rape i swear it isn’t that way in the dame D:

Is that script located under the GUI image?

1 Like

image

Here, try this and make sure to set it the same way in your game
Logo.rbxl (31.8 KB)

Try adding 1 (or more) more zero to the division:

local loudness = math.clamp(music.PlaybackLoudness / 10000, minSize, maxSize)

The music is really loud, so maybe its just at the max value all the time

1 Like

trying that now, sorry for delay

Still not working. @TopBagon M

What doesn’t work exactly? Isn’t this what you want?

1 Like

This is what I’m getting. I will try to move the audio.
*again sorry youtube keeps rendering it as an earrape

Moving it didn’t work.

i fixed it by changing the divider

2 Likes