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

GamePassId '5010007' is not of type Game Pass. ???

Asked by 6 years ago

that is the error message: GamePassId '5010007' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead.

this is my code:

local id = 5010007
 local Script = game.ServerScriptService.GamePassDoubleJump
 local LScript = game.ServerScriptService.GamePassDoubleJump.DoubleJump
 local scriptclone = LScript:clone()
game.Players.PlayerAdded:connect(function(player)
    if game:GetService("GamePassService"):PlayerHasPass(player, id) then 
        scriptclone.parent = game.Players.LocalPlayer.PlayerScripts
    end
end)

i have no idea why it isn't working.

0
All that I know is that https://www.roblox.com/game-pass/5010007/Double-Jump exists, and that the output is incorrect. GamingZacharyC 152 — 6y
0
actually they made a new gamepass system it wasnt the gamepass stumplee555 4 — 6y

3 answers

Log in to vote
0
Answered by
Vxpper 101
6 years ago

PlayerHasPass() is outdated, Here is the updates version, from now on, use game:GetService("MarketPlaceService"):UserOwnsGamePassAsync(player.UserId, id)

local id = 5010007
local Script = game.ServerScriptService.GamePassDoubleJump
local LScript = game.ServerScriptService.GamePassDoubleJump.DoubleJump
local scriptclone = LScript:clone()
    game.Players.PlayerAdded:connect(function(player)
        if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId, id) then
            scriptclone.parent = game.Players.LocalPlayer.PlayerScripts
      end   
end)

Let me know if this works :)

0
i also didnt put a capital p in Parent. but it works! :D stumplee555 4 — 6y
0
:D Vxpper 101 — 6y
0
oh btw i replaced local player because when i tested in a public server i tried it didnt work then i opened dev console (F9 menu) stumplee555 4 — 6y
0
saw there was an error the i put player instead of localplayer stumplee555 4 — 6y
View all comments (6 more)
0
nevemind didnt work :/ stumplee555 4 — 6y
0
it only works in studio stumplee555 4 — 6y
0
is it a server script User#23365 30 — 6y
0
i put it in serverscriptservice yes stumplee555 4 — 6y
0
Is it a regular script? Vxpper 101 — 6y
0
the script i showed yes the double jump one is a local script stumplee555 4 — 6y
Ad
Log in to vote
0
Answered by 6 years ago
Edited 6 years ago

They changed the thing with gamepasses.

there's really no point of explaining it here cause there's litterally all the code and explanaiton on wiki.

Here are the links:

dev forum post on changes

wiki link

0
That's good to know. I didn't know about the new system. stumplee555 4 — 6y
Log in to vote
0
Answered by 6 years ago

im not good with marketplace service stuff, but in the error it says use MarketPlaceService and PlayerOwnsAsset instead, so maybe like this:

local id = 5010007
 local Script = game.ServerScriptService.GamePassDoubleJump
 local LScript = game.ServerScriptService.GamePassDoubleJump.DoubleJump
 local scriptclone = LScript:clone()
game.Players.PlayerAdded:connect(function(player)
    if game:GetService("MarketplaceService"):PlayerOwnsAsset(player, id) then -- changed this
        scriptclone.parent = game.Players.LocalPlayer.PlayerScripts
    end
end)
0
I didn't think about playeradded. Thanks I think this would work stumplee555 4 — 6y
0
nope, the MarketPlaceService does not include the functions of the GamePassService. GamingZacharyC 152 — 6y

Answer this question