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

I need help on a music Gui?

Asked by
NotSoNorm 777 Moderation Voter
10 years ago

I have a SurfaceGui and I need a script so when I click on a button it plays an song.

1 answer

Log in to vote
0
Answered by 10 years ago
function GUIClick()
game.Workspace.MUSIC NAME:Play()
end
script.Parent.MouseButton1Click:connect(GUIClick)

Make sure the "MUSIC NAME" is replaced with the Music file's name and is in workspace. And make sure the script is a Local Script so only the player who clicked it can hear it.

0
Thanks NotSoNorm 777 — 10y
0
Remember to put good rep on me :3 RolandStudio 115 — 10y
0
I need 1 reputation to put vote up or down NotSoNorm 777 — 10y
0
Oh qq RolandStudio 115 — 10y
View all comments (9 more)
0
The script isnt working, Dose it matter if its a SurfaceGui? NotSoNorm 777 — 10y
0
Yes, it matters a lot... It has to be a regular GUI RolandStudio 115 — 10y
0
Oh NotSoNorm 777 — 10y
0
Is there a way to make it surfaceGui able? NotSoNorm 777 — 10y
0
I don't think so. RolandStudio 115 — 10y
0
oh NotSoNorm 777 — 10y
0
OMG I GOT IT TO WORK! NotSoNorm 777 — 10y
0
function Clicked() game.Workspace.SurfacePart.Songs.Song1:Play() end script.Parent.MouseButton1Down:connect(Clicked) NotSoNorm 777 — 10y
0
Correct RolandStudio 115 — 10y
Ad

Answer this question