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

How would I use the Sound properties to make this?

Asked by 9 years ago

I'm extremely new to scripting, and I've got no experience with any of the sound properties, though I've heard that there is one that turns true when the sound stops playing. I would like to use this to seamlessly create a script that will play the second part of a sound I have up, although I'm not sure how to use the properties to do this? Here is what I have so far;

brick=script.Parent
other=brick.Parent.stop
music=brick.Parent.music

function onClicked()

music:Play()

brick.Size=Vector3.new(1, 1, 1)
brick.Position=brick.Position-Vector3.new(0, 0, 0)

other.Size=Vector3.new(1, 1, 1)


end

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

This plays the first sound, however I don't know enough about this to make a second sound play afterwards.

1 answer

Log in to vote
1
Answered by
woodengop 1134 Moderation Voter
9 years ago

You can use a Property of Soundcalled IsPlaying (Boolean), This Property will return true if the audio is playing, if not then returns false.

1
Yes, true. But I find IsPlaying a bit buggy. But it seems to be the only way to check. lightpower26 399 — 9y
0
I do too. woodengop 1134 — 9y
Ad

Answer this question