Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
-1

GamePassService not working properly?

Asked by 10 years ago

So, i'm trying to make it so that If a player has a gamepass, a button(s) appears.

This gamepass gives you 1 weapon when bought:

local passid = 170543256
local GamePassService = Game:GetService('GamePassService')
if GamePassService:PlayerHasPass(player, passid) then
    script.Parent.Parent.Parent.Parent.MainFrame.Row1.KNIFEGUN.Visible = true
end

This gamepass gives you 2 weapons when bought:

local passid =  170544124
local GamePassService = Game:GetService('GamePassService')
if GamePassService:PlayerHasPass(player, passid) then
    script.Parent.Parent.Parent.Parent.MainFrame.Row1.M37.Visible = true
    script.Parent.Parent.Parent.Parent.MainFrame.Row1.m.Visible = true
end


This is not in a LocalScript.

Answer this question