Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

How would I use the Sound properties to make this?

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

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

2 comments

1

Yes, true. But I find IsPlaying a bit buggy. But it seems to be the only way to check.

0

I do too.

This discussion is preserved as it was. New answers, comments, and votes are closed.