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

I need help with my audio script? [ANSWERED]

Asked by 10 years ago

-Edit- This has been answered on the forums. Thanks a lot, guys. -_-

Hey, guys. I've recently tried to make a piano that plays some audio once clicked, but now it won't work.

function onClicked(playerWhoClicked)
    sound.SoundId = "http://www.roblox.com/asset/?id=154630272"
    sound.Looped = true
    sound.Parent = script.Parent
    sound:Play()
end

script.Parent.ClickDetector.MouseClick:connect(onClicked)

Line 2 is the problem, but I have NO idea what it is. I've looked everywhere and I'm getting pissed because of it.

Please help.

1 answer

Log in to vote
0
Answered by 10 years ago

You may want to delete the post if answered elsewere

Ad

Answer this question