|
| 15 Jul 2014 02:56 PM |
this is supposed to make the gui visible if the person owns the gamepass. the gui that's supposed to be visible to them is a textbutton, which is a button that opens a Frame when you click it
so "Doors" is a Gui with a Frame and a Texbutton in it.
for some reason this won't work
local AssetId = 166513346 local Badge = Game:service("BadgeService")
Game.Players.PlayerAdded:connect(function(Player) if Badge:UserHasBadge(Player.userId,AssetId) then Player.PlayerGui.Doors.Visible = true else Player.PlayerGui.Doors.Visible = false end end)
|
|
|
| Report Abuse |
|
|
| |
|
connor954
|
  |
| Joined: 24 Jul 2008 |
| Total Posts: 947 |
|
|
| 15 Jul 2014 03:03 PM |
Well, you put "BadgeService" not "GamepassService".
id = "IdHere"
game.Players.PlayerAdded:connect(function(id, player) if game:GetService("GamepassService"):PlayerHasPass(player, id) then game.StarterGui.ScreenGui.Frame.Visible = true else game.StarterGui.ScreenGui.Frame.Visible = false end end)
That should work |
|
|
| Report Abuse |
|
|
connor954
|
  |
| Joined: 24 Jul 2008 |
| Total Posts: 947 |
|
|
| 15 Jul 2014 03:07 PM |
| Put GamePassService instead of GamepassService. |
|
|
| Report Abuse |
|
|
connor954
|
  |
| Joined: 24 Jul 2008 |
| Total Posts: 947 |
|
| |
|
|
| 15 Jul 2014 03:17 PM |
idk.. nothing seems to work
thanks for trying tho |
|
|
| Report Abuse |
|
|
|
| 15 Jul 2014 03:18 PM |
i want the button/textbutton to be visible
so that if they want the frame to be visible, they click the textbutton |
|
|
| Report Abuse |
|
|
| |
|