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 » Scripting Helpers
Home Search
 

Re: What's wrong with this script? (please read)

Previous Thread :: Next Thread 
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 04:26 PM
while true do
wait(1)
script.Music.Pitch = 1
script.Music:play()
script.Music:pause()
wait(120)
script.Music2.Pitch = 1
script.Music2:play()
script.Music2:pause()
wait(120)
script.Music3.Pitch = 1
script.Music3:play()
script.Music3:pause()
wait(120)
script.Music4.Pitch = 1
script.Music4:play()
script.Music4:pause()
wait(120)
script.Music5.Pitch = 1
script.Music5:play()
script.Music5:pause()
wait(120)
script.Music6.Pitch = 1
script.Music6:play()
script.Music6:pause()
wait(120)
script.Music7.Pitch = 1
script.Music7:play()
script.Music7:pause()
wait(120)
script.Music8.Pitch = 1
script.Music8:play()
script.Music8:pause()
end


Its for a soundtrack. It won't play at all. What I want is it to play song 1, end it and play song 2, then stop song 2, start song 3 and ETC. Although I also eventually want it to go back to playing song 1 after playing song 8, I'm pretty sure that part is automatic though.
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
05 Sep 2014 04:27 PM
this is the holy grail of inefficiency right here, guys.
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
05 Sep 2014 04:29 PM
local sounds={[yoursound]=lengthofsong,[secondsong]=lengthagain}
while wait() do
for song,length in pairs(sounds) do
song:Play()
wait(length)
song:Stop()
end end

Add more sounds and stuff.
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 04:32 PM
Ok, so I do I o this

local sounds={[ID,ID,ID]=lengthofsong,[secondsong]=lengthagain}
while wait() do
for song,length in pairs(sounds) do
song:Play()
wait(length)
song:Stop()
end end
Report Abuse
Tynexx is not online. Tynexx
Joined: 11 Jul 2012
Total Posts: 1559
05 Sep 2014 04:35 PM
Erm no

local sounds={
[script.Parent.Music1]=120,
[script.Parent.Music2]=120,
[script.Parent.Music3]=120,
[script.Parent.Music4]=120,
[script.Parent.Music5]=120,
[script.Parent.Music6]=120,
[script.Parent.Music7]=120,
[script.Parent.Music8]=120
}
while wait() do
for song,length in pairs(sounds) do
song:Play()
wait(length)
song:Stop()
end end
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 04:37 PM
Oh, I see thanks :3
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 04:37 PM
wait what goes in localsounds{
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 04:38 PM
Im having a brain fart understanding this, can you try fixing my original script?
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
05 Sep 2014 04:39 PM
the original script was bad, his method would be more efficient
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 04:40 PM
I see, but I dont't get where to put the sound ID's in his script.
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 04:57 PM
The script didn't work.
Report Abuse
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
05 Sep 2014 05:03 PM
local sounds={
[script.Music1]=120,
[script.Music2]=120,
[script.Music3]=120,
[script.Music4]=120,
[script.Music5]=120,
[script.Music6]=120,
[script.Music7]=120,
[script.Music8]=120
}
while wait() do
for song,length in pairs(sounds) do
song:Play()
wait(length)
song:Stop()
end end
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 05:11 PM
What do I put in (sounds)? The ID's?
Report Abuse
Nyxis is not online. Nyxis
Joined: 15 Nov 2012
Total Posts: 3374
05 Sep 2014 05:12 PM
It says "script.*"

so clearly you put Sounds inside the script called Music1, Music2, et cetera
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 05:14 PM
Wait wait wait, music1, music2 etc. are sounds not scripts.
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 05:14 PM
Ohhhh I see
Report Abuse
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
05 Sep 2014 05:15 PM
.-.


OKAY

SO YOU PUT THE MUSIC INSIDE THE SCRIPT

WITH THE NAMES MATCHING

Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 05:18 PM
I did... Won't work. I put all the Music1, Music2 etc. inside the script.
Report Abuse
super10099 is not online. super10099
Joined: 30 Jan 2010
Total Posts: 1102
05 Sep 2014 05:19 PM
Output?
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 05:25 PM
what do you mean?
Report Abuse
177117 is not online. 177117
Joined: 17 May 2010
Total Posts: 1366
05 Sep 2014 05:32 PM
I fixed my original script, thanks for the help all!


:3
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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