Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
COMMUNITY QUESTION

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

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

1 comment

2 answers

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 comment

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

  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...

5 comments

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

0

I found out..

0

PlayerHasPass deprecated... You need to you use: UserOwnsGamePassAsync. Please accept my answer. Thanks

0

"Please accept my answer." lol

This discussion is preserved as it was. New answers, comments, and votes are closed.