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: Script to make music play in an area but not the other?

Previous Thread :: Next Thread 
Riftery is not online. 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 is not online. 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 is not online. 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
AdvertisementBoy is not online. AdvertisementBoy
Joined: 13 Jan 2014
Total Posts: 63
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 is not online. 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
memorycode is not online. memorycode
Joined: 24 Sep 2011
Total Posts: 3322
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 is not online. 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 is not online. 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 is not online. 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
Wunder_Wulfe is online. Wunder_Wulfe
Joined: 13 Sep 2016
Total Posts: 8356
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 is not online. 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
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