Riftery
|
  |
| Joined: 22 Nov 2012 |
| Total Posts: 12731 |
|
|
| 12 Jun 2017 06:53 PM |
Before I explain, I want to tell you guys I am a beginner scripter, and most likely you will be seeing me a lot in the next few days.
OKAY~~~~~~~
I want a script to make music play in one area, but not another. If you walk into a certain area it plays a different song, but only for the people who are in that special area.
Thanks for your help, if you need to know anything please ask. |
|
|
| Report Abuse |
|
|
Selerity
|
  |
| Joined: 20 Jan 2013 |
| Total Posts: 204 |
|
|
| 12 Jun 2017 07:07 PM |
wiki.roblox.com/index.php?title=API:Region3
|
|
|
| Report Abuse |
|
|
RuizuKun
|
  |
| Joined: 20 Jan 2016 |
| Total Posts: 1133 |
|
|
| 12 Jun 2017 07:29 PM |
Region3 is not For Beginners...
Use Touched and TouchEnded on a Part and Use a LocalScript to Run the Service
So Example
Part.Touched Play Sound
Part.TouchEnded Stop Sound
If only closed minds Knew how to SHUTUP |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 07:38 PM |
| I have seen a free model that involves a part/block, so when player is inside that part the song plays. And I guess as ######## said, function about touches or stuff might work best for you now. I'm not a scripter but the previously described method will be very helpful instead of using the Region3 will require you point x, y, z that might be more complicated for beginner scripter, unless you understand it is recommended to try using Region3. |
|
|
| Report Abuse |
|
|
Riftery
|
  |
| Joined: 22 Nov 2012 |
| Total Posts: 12731 |
|
|
| 12 Jun 2017 08:28 PM |
| Would that only play for one single person? @Riuz |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 08:30 PM |
Don't do touched and touch ended. Gross
Use Region3
Try looking at the wiki yourself first - reply back if you're having trouble
|
|
|
| Report Abuse |
|
|
Riftery
|
  |
| Joined: 22 Nov 2012 |
| Total Posts: 12731 |
|
|
| 12 Jun 2017 08:41 PM |
| I was gonna send the script I had made but ROBLOX filtered it, oh my.. |
|
|
| Report Abuse |
|
|
RuizuKun
|
  |
| Joined: 20 Jan 2016 |
| Total Posts: 1133 |
|
|
| 12 Jun 2017 08:43 PM |
LocalScript , means only for 1 Player - Client Side so Yes only for that player
If only closed minds Knew how to SHUTUP |
|
|
| Report Abuse |
|
|
Riftery
|
  |
| Joined: 22 Nov 2012 |
| Total Posts: 12731 |
|
|
| 12 Jun 2017 08:52 PM |
| Oh alright haha, maybe when I don't suck at scripting I will get into the better scripts. |
|
|
| Report Abuse |
|
|
|
| 12 Jun 2017 08:53 PM |
just use rotated region3 which is in a roblox library (only if ur 'regions' have a rotation) and then when using findPartsInRegion3, u need to whitelist the character of the client, that way, u can just check the amount of parts in the region (if its greater than 0, u r in the region because ur character is the only thing it detects) and then u need to use PlayLocalSound from the SoundService to play the sound locally or else for some reason it doesnt anymore |
|
|
| Report Abuse |
|
|
RuizuKun
|
  |
| Joined: 20 Jan 2016 |
| Total Posts: 1133 |
|
|
| 12 Jun 2017 08:54 PM |
| Region 3 is a pain ## ### ####### I tried it yesterday , I figured it out and everything but Touch Event is easier If only closed minds Knew how to SHUTUP |
|
|
| Report Abuse |
|
|