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
|
  |
| Joined: 31 Jan 2011 |
| Total Posts: 5289 |
|
| |
|
|
| 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 |
|
|
|
| 01 Oct 2014 01:35 PM |
^ what about touchended nob |
|
|
| Report Abuse |
|
|
|
| 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
|
  |
| 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
|
  |
| 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
|
  |
| Joined: 31 Jan 2011 |
| Total Posts: 5289 |
|
| |
|
RamaKpo1
|
  |
| Joined: 31 Jan 2011 |
| Total Posts: 5289 |
|
| |
|
|
| 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
|
  |
| 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 |
|
|