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: Song loop and switching!

Previous Thread :: Next Thread 
RamaKpo1 is not online. RamaKpo1
Joined: 31 Jan 2011
Total Posts: 5289
30 Sep 2014 03:50 PM
Hello!
Here I have a question
In my game, there's a song that plays when you enter it, let's name it Song1.
Now, let' say it loops, and it want it to stop looping and to change to another song when a player goes in a room or touches an certain brick, Song2 starts playing and looping, while Song1 stops playing and stops looping.

How can I do this?
Thanks!
Report Abuse
RamaKpo1 is not online. RamaKpo1
Joined: 31 Jan 2011
Total Posts: 5289
01 Oct 2014 12:57 PM
Bump!
Report Abuse
DaMrNelson is not online. DaMrNelson
Joined: 27 Jul 2009
Total Posts: 4405
01 Oct 2014 01:34 PM
This is all example code, you'll have to fill in the blanks.

song1:Play()
brick.Touched:connect(function()
song1:Stop()
song2:Play()
end)
Report Abuse
builderman0621 is not online. builderman0621
Joined: 13 Jul 2010
Total Posts: 1612
01 Oct 2014 01:35 PM
^
what about touchended nob
Report Abuse
DaMrNelson is not online. DaMrNelson
Joined: 27 Jul 2009
Total Posts: 4405
01 Oct 2014 01:41 PM
@builderman0621
"and it want it to stop looping and to change to another song when a player goes in a room or touches an certain brick"

Put a brick at the door of the room, or just do the brick thing. I see no reason to use TouchEnded instead of Touched here.
Report Abuse
RamaKpo1 is not online. RamaKpo1
Joined: 31 Jan 2011
Total Posts: 5289
01 Oct 2014 01:49 PM
Alright, thank you
I've still got a question;
Let's say, here
Brick named "Trigger1" for Room1, player touches "Trigger1" and the Song1 starts playing and looping.
Now, player exits Room1, and hits "Trigger2" on Room2, Song2 starts playing and looping, while Song1 stops looping and playing.

Then, let's say player goes back to Room1, hit's Trigger1b and Song2 stops looping and playing, and Song1 plays and loops again.

How would the code for that be?
or this;
for a brick to play X song when touched and loop
for a brick to stop X song when touched and loop

let's name the brick Trigger3 for starts
and Trigger4 for stops

could anybody tell me the script, like, the whole function with blankets filled if possible?
thanks.
Report Abuse
RamaKpo1 is not online. RamaKpo1
Joined: 31 Jan 2011
Total Posts: 5289
01 Oct 2014 01:51 PM
I don't know if I'm explaining myself right
like, basically; again

"How would the code for that be?
or this;
for a brick to play X song when touched and loop
for a brick to stop X song when touched and loop

let's name the brick Trigger3 for starts
and Trigger4 for stops

could anybody tell me the script, like, the whole function with blankets filled if possible?"
Report Abuse
RamaKpo1 is not online. RamaKpo1
Joined: 31 Jan 2011
Total Posts: 5289
01 Oct 2014 02:15 PM
Bump!
Report Abuse
RamaKpo1 is not online. RamaKpo1
Joined: 31 Jan 2011
Total Posts: 5289
01 Oct 2014 02:30 PM
Bump!
Report Abuse
DaMrNelson is not online. DaMrNelson
Joined: 27 Jul 2009
Total Posts: 4405
01 Oct 2014 02:33 PM
Sorry RamaKpo1, but most people here aren't going to make you this script for free. Your options are to make it yourself or acquire a large sum of robux.
Report Abuse
RamaKpo1 is not online. RamaKpo1
Joined: 31 Jan 2011
Total Posts: 5289
01 Oct 2014 02:34 PM
Well, then, I am not asking for a script that would even be *that complicated
but, alright.

thank you anyways.
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