Is there a way that I can get an event to trigger if the sound is not playing anymore?
while true do wait(1) if script.Parent.Sound.IsPlaying then script.Parent.Parent.SongPlayNoter.Visible = true script.Parent.Parent.ScrollingFrame.Visible = false elseif script.Parent.Sound.IsPaused then script.Parent.Parent.ScrollingFrame.Visible = true script.Parent.Parent.SongPlayNoter.Visible = false end end
You can use Changed event instead of a loop.
sound = script.Parent.Sound -- the sound function changed() -- every time a property of sound changes, this function runs. if sound.IsPlaying == false then -- checks if the sound isn't playing anymore (it stopped) -- CODE end end sound.Changed:connect(changed)