I used this:
Music.IsPlaying.Changed:connect(PlayMusic)
and it gave me an error, basically when the 'IsPlaying' property of Music changes it will call a function, any help greatly appreciated.
I used this:
Music.IsPlaying.Changed:connect(PlayMusic)
and it gave me an error, basically when the 'IsPlaying' property of Music changes it will call a function, any help greatly appreciated.
IsPlaying is a boolean value, they can't be indexed (don't have values within them). Changed is an event of your Sound object Music. Unfortunately the Changed event doesn't fire on a Sound object for the IsPlaying property. However there are other events that are fired when a Sound object's IsPlaying property may change.
Sound.Played
Music.Played:connect(MusicPlayed)
Music.Paused:connect(MusicPaused)
Music.Stopped:connect(MusicStopped)
Music.Ended:connect(MusicEnded)
This discussion is preserved as it was. New answers, comments, and votes are closed.