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

How do i make a part go up and down depending on the music?

Asked by 4 years ago

i want a part called move1 to move up and down depending on the music and i dont know how to make it move 0.5 studs up max


local speaker = workspace.Speaker local move1 = speaker.Move1 local move2 = speaker.Move2 game:GetService("RunService").RenderStepped:connect(function() move1.Position = Vector3.new(0.041,58 * (workspace.Sound.PlaybackLoudness/5)/4.8, 34.599) print(58 * (workspace.Sound.PlaybackLoudness/5)/4.8) if (workspace.Sound.PlaybackLoudness/5)/2 < 57.18 then move1.Position = Vector3.new(0.041, 57.18, 34.599) end workspace.Camera.FieldOfView = 70 + workspace.Sound.PlaybackLoudness * 0.01 workspace.Camera.CFrame = workspace.Camera.CFrame * CFrame.Angles(0, 0, math.rad(math.random(-workspace.Sound.PlaybackLoudness, workspace.Sound.PlaybackLoudness) * 0.01)) + Vector3.new( math.rad(math.random(-workspace.Sound.PlaybackLoudness * 0.08, workspace.Sound.PlaybackLoudness * 0.08) * 0.05), math.rad(math.random(-workspace.Sound.PlaybackLoudness * 0.08, workspace.Sound.PlaybackLoudness * 0.08) * 0.05), math.rad(math.random(-workspace.Sound.PlaybackLoudness * 0.08, workspace.Sound.PlaybackLoudness * 0.08) * 0.05) ) game.Lighting.Blur.Size = workspace.Sound.PlaybackLoudness * 0.0185 game.Lighting.Bloom.Threshold = workspace.Sound.PlaybackLoudness * 0.0045 game.Lighting.SunRays.Intensity = workspace.Sound.PlaybackLoudness * 0.0015 game.Lighting.SunRays.Spread = workspace.Sound.PlaybackLoudness * 0.005 end)

i cant figure out how to do that, i dont want it to go below 57.18 and i dont want it to go up to 200. how do i do this?

Answer this question