firegosse
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 37 |
|
|
| 09 Feb 2016 10:15 AM |
| Hey. I need your help with a script. I want that if you buy a game pass that you can turn on music. But only music for the player itself! If you dont know how for only the player itself then i would like to know how to do it for everyone if 1 person buys the gamepass. THANKS! |
|
|
| Report Abuse |
|
|
|
| 09 Feb 2016 10:27 AM |
| So, will only the player that buys it be able to hear the music, or will everyone hear it, but the player be able to chose..? |
|
|
| Report Abuse |
|
|
firegosse
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 37 |
|
|
| 09 Feb 2016 10:47 AM |
| yes the 1 that it is for only himself and another script for 1 that can choose for everyone else |
|
|
| Report Abuse |
|
|
|
| 09 Feb 2016 10:51 AM |
| Placing music in the player's PlayerGui (either by StarterGui or by cloning) makes the music play only for the player. You could then add a script that checks they have a game pass, and if they do, then they can play it. |
|
|
| Report Abuse |
|
|
firegosse
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 37 |
|
|
| 09 Feb 2016 11:26 AM |
| Im not good at scripting can you please tell me the script?? |
|
|
| Report Abuse |
|
|
|
| 09 Feb 2016 11:39 AM |
Okay, but don't expect to always get one made for you. Try to learn from scripts too. It's worth it in the end, trust me.
local gpID = [gamepassid] local soundID = "rbxassetid://[soundid]"
game.Players.PlayerAdded:connect(function(player) if Game:GetService("GamePassService"):PlayerHasPass(player, gpID) then local soundHolder = Instance.new("ScreenGui") local sound1 = Instance.new("Sound") sound1.SoundId = soundID soundHolder.Parent = player:WaitForChild("PlayerGui") sound1.Parent = soundHolder sound1:Play() end end)
Replace the areas marked with the ids. Remove the [] of course. It should work. Hopefully. Tell me if it doesn't and I'll fix it. |
|
|
| Report Abuse |
|
|
firegosse
|
  |
| Joined: 07 Nov 2010 |
| Total Posts: 37 |
|
| |
|