I am making surface Gui music Gui. When you click the play button which is next to the song you want, the decal on the ImageButton changes decals from a red play symbol to a green one. When you click the next song I want the previous button the turned green to reset back to, red the current script is:

function Clicked()

	 game.Workspace.MusicGUI.SurfaceGui.Frame.MusicButton1.Image = "rbxassetid://240281070"

game.Workspace.MusicGUI.SurfaceGui.Frame.MusicButton2.Image = "rbxassetid://240281070"

 game.Workspace.MusicGUI.SurfaceGui.Frame.MusicButton3.Image = "rbxassetid://240281070"

game.Workspace.MusicGUI.SurfaceGui.Frame.MusicButton4.Image = "rbxassetid://240281070" end Music.MouseButton1Down:connect(Clicked)

I was planning on adding a lot more buttons and I was wondering if there was an easier way of doing this instead of repeating this process?

1 comment

0

Please put your code in appropriate Lua code block