I am using a boolvalue and a sound and a clickdetector. I am trying to make it so when I press the siren [i am making a police car] a siren sound plays. I got the script as a free model but i had to edit it since it meant that I could only play it not stop / pause it.
Brick = script.Parent
Sound = Brick.Sound
function onClicked()
Sound:Play()
script.Parent.Value.Value = true
end
function onClicked()
if script.Parent.Value.Value = true then
Sound:Stop()
else
end
script.Parent.ClickDetector.MouseClick:connect(onClicked)
here is the hierachy Part Sound Clickdetector Value (boolvalue) Script
The worst thing for me is that I cannot find any decent place to help me start learning to script! thanks

3 comments
Sad Violin... :(
thank you for being nice and my friend
i had to change where it says sound to script.Parent.Sound