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

please help with my game pass script it is saying that it is not a game pass ?

Asked by 6 years ago

game pass id( /game-pass/configure?id=(5337475) yes i only took the numbers

it says GamePassId '5337475' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead.

local GamePassService = game:GetService('GamePassService')
local InsertService = game:GetService('InsertService')
local GamePassIdObject = script.GamePassId






local plr=script.Parent.Parent.Parent
    if GamePassService:PlayerHasPass(plr, GamePassIdObject.Value) then


        end

2 answers

Log in to vote
-1
Answered by
Leamir 3138 Moderation Voter Community Moderator
6 years ago

Hello, tylergoatboy!

I made some changes on your script and now it works

local GamePassService = game:GetService('MarketPlaceService') -- "GamePassService" is deprecated, and is not working, use MarketPlaceService
local InsertService = game:GetService('InsertService')
local GamePassIdObject = script.GamePassId






local plr=script.Parent.Parent.Parent
    if GamePassService:UserOwnsGamePassAsync(plr.UserId, GamePassIdObject.Value) then


        end

Good Luck with your games

1
explain why their script didn't work, and why yours does, don't just give the code without an explanation. These answers are not constructive User#19524 175 — 6y
Ad
Log in to vote
-3
Answered by
Oficcer_F 207 Moderation Voter
6 years ago
  1. Go to your game. 2.Open the gamepass (NOT IN THE CONFIGURE TAB) 3.Go to the link 4.Take ONLY the numbers 5.Paste into script.

I think the error is that you chose a configure id...

0
game-pass/5337475/test so the game pass is (5337475) and the game pass in configure tab is /game-pass/configure?id=(5337475) they are the same it is nothing to do with the ID of the pass tylergoatboy 82 — 6y
0
I found out.. Oficcer_F 207 — 6y
0
PlayerHasPass deprecated... You need to you use: UserOwnsGamePassAsync. Please accept my answer. Thanks Oficcer_F 207 — 6y
0
"Please accept my answer." lol bhqpping 80 — 6y

Answer this question