I have a sound that get played for my intro. Everything works fine except the end. I have it where at the end of the intro, it would remove the screengui and all the children that is along with it. It seems normal but it's not because instead of removing itself, it plays the song over again. This is my code:
local bells = bg.bells --the sound bells:Play() wait(5) bg.bells.Volume = 0 --I added these to make the songs stop making sound but it does not work bg.haunting.Volume = 0 game:GetService("StarterGui").Intro:Remove() --Trying to remove my intro along with all the children with it
I don't know how to make it stop. Should I just use a different method or not use sounds at all?
Ok, so first of all you should reference "intro" earlier making sure it is the correct one. Then you should write the code when you want to stop the sound:
bells:Stop()
And make sure that the bells are not on loop. Having them on loop might be your problem. Do the same for the haunting sound. Finally to remove something you have to do the following:
game:GetService("StarterGui").Intro:Destroy()
If it doesn't work comment and I will see what I can do. Hope this helps!