jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 08:47 PM |
It is supposed to make the music player visible of a player has the pass.
local GamePassService = Game:GetService('GamePassService')
PassId = 94698248
if GamePassService:PlayerHasPass(game.Workspace:FindFirstChild('Humanoid'), GamePassIdObject.Value) then game.PlayerGui.Musicplayer.TopBar.Visible = true end
|
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 08:50 PM |
OK, I fixed my error, but now I cant use the PlayerGui thing.... D:
local GamePassService = Game:GetService('GamePassService')
PassId = 94698248
if GamePassService:PlayerHasPass(game.Workspace:FindFirstChild('Humanoid'), PassId) then game.PlayerGui.Musicplayer.TopBar.Visible = true end |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 09:10 PM |
Go learn the player structure and how to access it before getting into these kinds of things pl0x.
Please make this into .PlayerAdded function please.
------------------------- ~thedestroyer115, nice and helpful posts- sometimes~ |
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 09:20 PM |
OK, I dont get any error, but it still isnt working.
local GamePassService = Game:GetService('GamePassService')
PassId = 94698248
game.Players.PlayerAdded:connect(function(player) if GamePassService:PlayerHasPass(player, PassId) then game.player.PlayerGui.ScreenGui.Musicplayer.TopBar.Visible = true end end) |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 09:21 PM |
Use the UserHasBadge method. It is a lot more "trusty."
------------------------- ~thedestroyer115, nice and helpful posts- sometimes~ |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 09:21 PM |
game.player.PlayerGui
Should be player.PlayerGui |
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 09:25 PM |
Look, this is what I have now, and I am not getting any output, but it isnt working..
Players = game:GetService("Players") local GamePassService = Game:GetService('GamePassService')
PassId = 94698248
game.Players.PlayerAdded:connect(function(player) if GamePassService:PlayerHasPass(player, PassId) then game.player.PlayerGui.ScreenGui.Musicplayer.TopBar.Visible = true end end) |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 09:27 PM |
local GamePassService = Game:GetService('GamePassService') PassId = 94698248
game.Players.PlayerAdded:connect(function(player) if GamePassService:PlayerHasPass(player, PassId) then player.PlayerGui.ScreenGui.Musicplayer.TopBar.Visible = true end end)
------------------------- ~thedestroyer115, nice and helpful posts- sometimes~ |
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 09:29 PM |
Na, that didnt work, did the same thing the other one did. No error, no work.
But I didnt expect that to work, all you did was remove the game.
That doesnt really matter, does it?
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 09:32 PM |
Wait.................
You're making it visible only when You enter, the PlayerGui may not BE THERE YET
Plus You lose it when You respawn. |
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 09:35 PM |
Ughhh so what am I supposed to do?
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 09:48 PM |
Just put a wait.
------------------------- ~thedestroyer115, nice and helpful posts- sometimes~ |
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 09:54 PM |
Yeah I did that, it didnt work. I am getting frustrated.
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 10:12 PM |
Players = game:GetService("Players") GamePassService = Game:GetService("GamePassService") local PassId = 94698248
Players.PlayerAdded:connect(function(player) player.CharacterAdded:conenct(function(char) repeat wait() until char and player if GamePassService:PlayerHasPass(player, PassId) then game.player.PlayerGui.ScreenGui.Musicplayer.TopBar.Visible = true end end) end)
|
|
|
| Report Abuse |
|
|
| |
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 10:23 PM |
OMG I think it worked. One sec, I gotta try on an account without the pass.
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
wariomon
|
  |
| Joined: 27 Sep 2008 |
| Total Posts: 228 |
|
|
| 09 Oct 2012 10:25 PM |
No, it didnt workk. :/
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 10:26 PM |
I see whats wrong:
Players = game:GetService("Players") GamePassService = Game:GetService("GamePassService") local PassId = 94698248
Players.PlayerAdded:connect(function(player) player.CharacterAdded:conenct(function(char) repeat wait() until char and player if GamePassService:PlayerHasPass(player, PassId) then player.PlayerGui.ScreenGui.Musicplayer.TopBar.Visible = true end end) end)
try that. |
|
|
| Report Abuse |
|
|
wariomon
|
  |
| Joined: 27 Sep 2008 |
| Total Posts: 228 |
|
|
| 09 Oct 2012 10:28 PM |
K, gotta test on two different account, Ill see if it works in a sec.
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
wariomon
|
  |
| Joined: 27 Sep 2008 |
| Total Posts: 228 |
|
|
| 09 Oct 2012 10:29 PM |
IDK, becasue it didnt work when I went into it with the account with the gamepass.
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 10:30 PM |
| Did you try the current script? |
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 10:31 PM |
Yeah, the first one you gave me worked kinda. If the user had a game pass, it showed the thing, if the user didnt have it it also showed it. The second one doesnt show it either way.
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
|
| 09 Oct 2012 10:33 PM |
local PassId = 94698248
Game.Players.PlayerAdded:connect(function(player) player.CharacterAdded:connect(function(char) repeat wait() until char and player if Game:GetService("GamePassService"):PlayerHasPass(player, PassId) then player.PlayerGui.ScreenGui.Musicplayer.TopBar.Visible = true end end) end)
try that ^^ I spelled connect wrong. |
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 10:35 PM |
Huh, weird..I quickly opened the output and didnt see the misspelling. Oh well. lol
Huh, sad to say it still isnt working. When I enter with the game pass I dont see it.
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|
jerryg225
|
  |
| Joined: 20 Aug 2008 |
| Total Posts: 23187 |
|
|
| 09 Oct 2012 10:40 PM |
local PassId = 94698248 Game.Players.PlayerAdded:connect(function(player) --game.Players? player.CharacterAdded:connect(function(char) repeat wait() until char and player if Game:GetService("GamePassService"):PlayerHasPass(player, PassId) then player.PlayerGui.ScreenGui.Musicplayer.TopBar.Visible = true end end) end)
~Lets talk when you get more money than me! |
|
|
| Report Abuse |
|
|