01 | brick = script.Parent |
02 |
03 | music = brick.Parent.music |
04 |
05 | function onClicked() |
06 | if music.Played = = false then |
07 | music:Play() |
08 | end |
09 | end |
10 | script.Parent.ClickDetector.MouseClick:connect(onClicked) |
if anyone is able to help that'd be amazing! thanks. Any reply is helpful.
Use the property of sounds playing http://wiki.roblox.com/index.php?title=API:Class/Sound/Playing
1 | function onClicked() |
2 | if not music.Playing then |
3 | music:Play() |
4 | end |
5 | end |