game:GetService("RunService").RenderStepped:Connect(function() local loudness = workspace.Songs.MusicPlayer.PlaybackLoudness if loudness >= 100 then game.Workspace.test1.Material = "Neon" game.Workspace.test1.BrickColor = BrickColor.new "Teal" else game.Workspace.test1.Material = "Metal" game.Workspace.test1.BrickColor = BrickColor.new "Really black" end end)
I know how to make it go with the loudness but is there a way to make the colors change smoothly?
test1 = a brick
In order to make it run smoothly, you could take advantage of Color3s.
Color3.new(r,g,b)
and Color3.fromRGB(r,g,b)
allow you to construct a color by simply plugging in numbers to the constructor. If you run BrickColor.new(Color3)
, you then get a brick color from that Color3.
As a result, you could simply write a function that calculates r,g,b values based on loudness and use that to create a Color3.
I found a way that could make the brickcolor change smoother (by using Color3 and set the value to playbackloudness of the audio: But it couldn't change the material
local loudness = workspace.Songs.MusicPlayer.PlaybackLoudness + 0 -- Change the amount if needed to make the brick brighter / darker game:GetService("RunService").RenderStepped:Connect(function() game.Workspace.test1.Color= Color3.new(loudness ,loudness ,loudness) if loudness >= 100 then game.Workspace.test1.Material = "Neon" end if loudness <= 50 then game.Workspace.test1.Material = "Metal" end end)
I hope this would help you :D I haven't checked it yet..if it didn't help.................sorry
Use Tweenservice, there's no need for renderstepped here or anything, read up on how to make a rainbow effect here and just change it to the colors you want.
https://devforum.roblox.com/t/how-to-create-a-simple-rainbow-effect-using-tweenservice/221849