of     1   

excellentAnarchy
#141152533Tuesday, July 22, 2014 9:58 AM GMT

local passId = 1214124 function Clicked() return game:GetService("GamePassService"):PlayerHasPass(player, passId) end game.Players.PlayerAdded:connect(function(plr) elseif Clicked() then script.Parent.Parent.Frame.Visible = true else script.Parent.Parent.NoPass.Visible = true end) script.Parent.MouseButton1Down:connect(Clicked) ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ What's wrong with the above? I'm trying to: When a player clicks the imagebutton, it will check if he has a game pass, if he does, another GUI will pop up, but if he doesn't then a different GUI pops up (or one of those ROBLOX GUI's asking whether you want to purchase the game pass - if any one of you is able to make this work)
lampwnage121
#141152742Tuesday, July 22, 2014 10:05 AM GMT

"elseif" -> if*
excellentAnarchy
#141152909Tuesday, July 22, 2014 10:09 AM GMT

11:09:18.274 - Not a valid Player 11:09:18.275 - Script 'Players.Player1.PlayerGui.Guide.ImageButton.Script', Line 4 11:09:18.277 - Stack End 11:09:18.278 - Disconnected event because of exception
SenseiWarrior
#141153106Tuesday, July 22, 2014 10:15 AM GMT

player and passid not defined
excellentAnarchy
#141153514Tuesday, July 22, 2014 10:26 AM GMT

passId is defined And how would I define the player in this case?
ByDefault
#141153629Tuesday, July 22, 2014 10:29 AM GMT

local id = IDHERE game.Players.PlayerAdded:connect(function(plr) if game:GetService("GamepassService"):PlayerHasPass(plr, id) then script.Parent.Visible = true end)
excellentAnarchy
#141153755Tuesday, July 22, 2014 10:33 AM GMT

? I'm totally lost.
lampwnage121
#141153781Tuesday, July 22, 2014 10:33 AM GMT

... Didn't look at the actual script. What is this even in? This would be a local script inside of a gui. Why are you using the PlayerAdded event inside of something that will replicate to all users? Define the player in the local script and remove anonymous function and it's innards. player = game.Players.LocalPlayer
excellentAnarchy
#141153867Tuesday, July 22, 2014 10:36 AM GMT

Should it look like this? local passId = 167686361 local player = game.Players.LocalPlayer function Clicked() return game:GetService("GamePassService"):PlayerHasPass(player, passId) end if Clicked() then script.Parent.Parent.Frame.Visible = true else script.Parent.Parent.NoPass.Visible = true end end) script.Parent.MouseButton1Down:connect(Clicked)
lampwnage121
#141153945Tuesday, July 22, 2014 10:38 AM GMT

script.Parent.MouseButton1Down:connect(function() if game:GetService("GamePassService"):PlayerHasPass(game.Players.LocalPlayer, 167686361) script.Parent.Parent.Frame.Visible = true else script.Parent.Parent.NoPass.Visible = true end end)
excellentAnarchy
#141153962Tuesday, July 22, 2014 10:38 AM GMT

I'm still getting "Not a valid player - line 5" in the output :/
excellentAnarchy
#141154027Tuesday, July 22, 2014 10:40 AM GMT

Testing your script...
excellentAnarchy
#141154075Tuesday, July 22, 2014 10:41 AM GMT

if game:GetService("GamePassService"):PlayerHasPass(game.Players.LocalPlayer, 167686361) then ~~~~~~~~~~~~~ -- not a valid player.
excellentAnarchy
#141154142Tuesday, July 22, 2014 10:43 AM GMT

It goes down to 'else' even though I have the pass...
excellentAnarchy
#141155659Tuesday, July 22, 2014 11:20 AM GMT

bump

    of     1