generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripters
Home Search
 

Re: HELP!

Previous Thread :: Next Thread 
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:10 PM
Hey guys, I know you probably wont care at all about this.

I'm looking for a script, where you insert audio ID's and that would make the audio play well in the game.

But, not a music player like a GUI on the side of your screen. I'm looking for something that when you enter the game music plays, then when that song finishes more music plays, and so on.

If there is already a model for this, please put the link.

I really need help!

):
(:



AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:13 PM
BUMP [1]


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
05 Jul 2015 05:14 PM
Here is the easiest way I can think, it plays a random song, then when it ends plays another random one etc.


local songs = {"Song1", "Song2"} -- List your songs, they must be located inside this script.

while true do()
local playing = songs[math.random(1, #songs)]
script[playing]:Play()
wait(script[playing].TimeLength)
end

Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:18 PM
There was an error on line 3.

Expected identifier, got ')'


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
05 Jul 2015 05:19 PM
Oh lol! I feel stupid... I accidentally defined while true do as having arguments..

local songs = {"Song1", "Song2"} -- List your songs, they must be located inside this script.

while true do
local playing = songs[math.random(1, #songs)]
script[playing]:Play()
wait(script[playing].TimeLength)
end
Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:22 PM
Still didn't work.

I tried putting it in ServerScriptStorage, still didn't work! Help!?


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:24 PM
Wait, was I supposed to put something here? (script[playing].TimeLength) inbetween the [playing] and the TimeLength?


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
05 Jul 2015 05:25 PM
Ok, ill make it a bit closer to what you asked for. Just put it in a script, inside workspace and put your song ID's we're it tells you too:


local songs = {"ID1", "ID2"} -- List your songs id's here

while true do
local playing = songs[math.random(1, #songs)]
song = Instance.new("Sound", workspace)
song.Name = "Song"
song.SoundID = "http://www.roblox.com/asset/?id="..playing
song:Play()
wait(song].TimeLength)
end
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
05 Jul 2015 05:26 PM
OOPS! Found a bug, fixed it (I think):


local songs = {"ID1", "ID2"} -- List your songs id's here

while true do
local playing = songs[math.random(1, #songs)]
song = Instance.new("Sound", workspace)
song.Name = "Song"
song.SoundID = "http://www.roblox.com/asset/?id="..playing
song:Play()
wait(song.TimeLength)
song:Destroy()
end
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
05 Jul 2015 05:30 PM
Ok, I tested it with this. Had to make one change, But it works:

local songs = {"142762345", "178169855", "222418077"} -- List your songs id's here

while true do
local playing = songs[math.random(1, #songs)]
song = Instance.new("Sound", workspace)
song.Name = "Song"
song.SoundId = "http://www.roblox.com/asset/?id="..playing
song:Play()
wait(song.TimeLength)
song:Destroy()
end
Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:30 PM
It still didn't work, thanks for all the help btw!

):


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:31 PM
Oh, now that I see the new one, I'll test it.

Disregard


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:39 PM
It works, but I'm sorry for asking for so much!

But if you could,

please make it so there would be like a 2 second wait in between songs.

Thanks!

Otherwise, It's great!

Also, to duplicate I would just take add more "ID", << those?


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:40 PM
By duplicate I mean add more songs


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
05 Jul 2015 05:41 PM
Sure! And yes, to add more just add ,"ID" inside songs :) Your delay has been added:

local songs = {"142762345", "178169855", "222418077"} -- List your songs id's here

while true do
local playing = songs[math.random(1, #songs)]
song = Instance.new("Sound", workspace)
song.Name = "Song"
song.SoundId = "http://www.roblox.com/asset/?id="..playing
song:Play()
wait(song.TimeLength)
wait(2)
song:Destroy()
end

Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:51 PM
The songs all played at once, though..


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
05 Jul 2015 05:54 PM
I have no idea why that happened, but I fixed it:

local songs = {"142762345", "178169855", "222418077"} -- List your songs id's here

while true do
wait(2)
local playing = songs[math.random(1, #songs)]
song = Instance.new("Sound", workspace)
song.Name = "Song"
song.SoundId = "http://www.roblox.com/asset/?id="..playing
song:Play()
wait(song.TimeLength)
song:Destroy()
end
Report Abuse
AverageSausage is not online. AverageSausage
Joined: 30 Aug 2012
Total Posts: 903
05 Jul 2015 05:57 PM
Thanks so much! I'll contact you if there is any more problems with the script!


AverageSausage | What you just said is the most idiotic thing I've ever heard.
Report Abuse
ColdUndermined is not online. ColdUndermined
Joined: 25 Jan 2010
Total Posts: 1819
05 Jul 2015 05:57 PM
No problem! Im happy to help.
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image