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 » Scripting Helpers
Home Search
 

[ Content Deleted ]

Previous Thread :: Next Thread 
jerryg225 is not online. 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 is not online. 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
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
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 is not online. 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
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
09 Oct 2012 09:21 PM
Use the UserHasBadge method. It is a lot more "trusty."



-------------------------
~thedestroyer115, nice and helpful posts- sometimes~
Report Abuse
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
09 Oct 2012 09:21 PM
game.player.PlayerGui

Should be player.PlayerGui
Report Abuse
jerryg225 is not online. 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
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
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 is not online. 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
thecaptain97 is not online. thecaptain97
Joined: 17 Jun 2010
Total Posts: 4987
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 is not online. 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
thedestroyer115 is not online. thedestroyer115
Joined: 19 Dec 2010
Total Posts: 11546
09 Oct 2012 09:48 PM
Just put a wait.

-------------------------
~thedestroyer115, nice and helpful posts- sometimes~
Report Abuse
jerryg225 is not online. 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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
09 Oct 2012 10:15 PM
*Try mine.*
Report Abuse
jerryg225 is not online. 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 is not online. 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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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 is not online. 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 is not online. 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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
09 Oct 2012 10:30 PM
Did you try the current script?
Report Abuse
jerryg225 is not online. 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
thedeathmaster01 is not online. thedeathmaster01
Joined: 14 Mar 2010
Total Posts: 6331
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 is not online. 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 is not online. 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
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • 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