This is in a localscript, this is also my first time actually making a gamepass, i never actually cared for it in the past, so if anyone can help me it'd be great, i am having problems with it:
local pewdiepass = 599082309
local gpserv = game:GetService("GamePassService")
if gpserv:PlayerHasPass(plr, pewdiepass) then
subs.Value = subs.Value +785
money.Value = money.Value +1250
end
this is the error code:
Game passes can only be queried by a Script running on a ROBLOX game server

6 comments
i tried that same thing and it gave me the same error
Go to "Configure your game" not "Configure this place" and enable "Enable Studio Access to API Services"
I already did that, does my HttpService need to be on?
No, what's the error? It should be working http://wiki.roblox.com/index.php?title=API:Class/GamePassService/PlayerHasPass
Use :PlayerOwnsAsset()
Nevermind, I figured it out, It is highly recommended by roblox to use PlayerOwnsAsset, i didn't read that part, but thanks for the help atleast, i will accept the answerfor your effort