|
| 27 Mar 2014 11:10 AM |
Hi, I have this music player:
while true do wait() -- Lets the computer know that it can take it's time. script.part1:Play() wait(120) script.Part2:Play()
end
Its not very efficient and it takes a while to load.
I have 2 parts of a song, I need them to play seamlessly to together and this isn't working out to well. |
|
|
| Report Abuse |
|
|
| |
|
BladeXE
|
  |
| Joined: 22 Dec 2012 |
| Total Posts: 3857 |
|
|
| 27 Mar 2014 11:12 AM |
| You can have them both in loop and just change the volume |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:13 AM |
| how would I go about doing that? |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:13 AM |
| First of all the wait() after the while really won't make a difference since it only waits 1/30th of a second. Have you tried playing with the second wait to make the two tracks match up? |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:15 AM |
@brandon
but it has to load the other song and loading times are always different.
How could I do the pre-load function |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:16 AM |
Sound1:Play()
while not Sound1.IsPaused do --Not sure if Sound1.IsPlaying would work the same wait(1/30) end
Sound2:Play() |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:17 AM |
| I've never really played much with sounds so I may not be the best person to help, if this problem is fixable. After the first time the song is played is the loading time of the song shortened for every other time the same song is played? |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:19 AM |
To preload, use this:
game:GetService("ContentProvider"):Preload(Sound1.SoundId) game:GetService("ContentProvider"):Preload(Sound2.SoundId)
With the new roblox update, a sound will not play until it is fully loaded. It will wait until it is loaded first. You may want to wait a few seconds before playing the sounds. |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:19 AM |
@Fire
your script won't even play |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:22 AM |
@EncryptedZ Because theres no part of it that actually plays the sound. What he posted is for making the sound load before it plays, so when you play it you won't have to wait until it loads.
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:23 AM |
@flip, I was talking about his earlier post.
not the preload function |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:25 AM |
| I wrote "Sound1" and "Sound2" for my own convenience. It was implied that you need to add script.Parent before each, or somehow index your two sounds first. Also, if you did do that, read the output |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:28 AM |
@Fire.
Yeah it plays the first part.
But for Sound2 it doesn't play. |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:29 AM |
Sound1 plays fine.
But Sound2 doesn't play at all. |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:30 AM |
@EncryptedZ Sorry, didn't realize that. His script would work though, but you have to define "Sound1" and "Sound2". There's no sort of magic that automatically makes the computer know what you mean when you tell it something. You have to tell it EXACTLY what to do.
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:31 AM |
while Sound1.IsPlaying do wait(1/30) end
Sound2:Play()
Replace the lower half with this, and if this doesn't work, there's no way to do it. It means roblox did not yet fix these properties of their sounds. |
|
|
| Report Abuse |
|
|
|
| 27 Mar 2014 11:31 AM |
Mother of slow internet ninjas
~The herp lerped a derp~ |
|
|
| Report Abuse |
|
|
| |
|
|
| 27 Mar 2014 01:18 PM |
Yeah, it doesnt work
first part plays but not second |
|
|
| Report Abuse |
|
|
| |
|
| |
|