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

My music im using for my game keeps repeating please help?

Asked by
Aqu_ia 39
4 years ago

Alright so, I'm trying to make music for my loading screen, but the music keeps on repeating its previous sound. Also, when the loading screen is done, the music gets destroyed.

I've tried everything such as:

script.Parent.Parent.Parent["Star Wars - The Force Theme [ Remix ]"]:Destroy()

and...

script.Parent.Parent.Parent["Star Wars - The Force Theme [ Remix ]"]:Play()

but it won't work. Help!

0
Is it looped? User#22722 20 — 4y
0
And playing plays it again, you used :Stop() User#22722 20 — 4y
0
Oh, I'll try it. Aqu_ia 39 — 4y
0
Wow thanks you fixed it! Aqu_ia 39 — 4y

1 answer

Log in to vote
0
Answered by 4 years ago

Sound instances have a looped property, set it to false like this

script.Parent.Parent.Parent["Star Wars - The Force Theme [ Remix ]"].Looped = false
script.Parent.Parent.Parent["Star Wars - The Force Theme [ Remix ]"]:Play()
0
I figured out the problem. My script had a while wait do command on it, which repeats the music. I have fixed it now. Aqu_ia 39 — 4y
Ad

Answer this question