So basically I have a gamepass which when you buy it turns a boolean on. But that isnt working. I probed the script, tested some on servers and came to the conclusion that the boolean is'nt changing. But, the console shows no errors.
Thanks, -RadioactiveSherbet
local passid = 440638589 -- Gamepass ID
local GamePassService = game:GetService("GamePassService")
game.Players.PlayerAdded:connect(function(player)
if GamePassService:PlayerHasPass(player, passid) then
player.CGPH.Value = true
end
end)
Please downvote if you thought it through, and it would be nice to upvote

3 comments
It still didnt work
@RadioactiveSherbert, have you checked the Developer Console (Check both Server and Local Logs tabs) or Output to indicate if there are any errors. What environment are you testing this in (Studio Play Solo, Studio Test Server, Online Mode)?
Online mode because gamepass queries dont work in Studio @M39a9am3R