that is the error message: GamePassId '5010007' is not of type Game Pass. Please use MarketplaceService:PlayerOwnsAsset instead.
this is my code:
1 | local id = 5010007 |
2 | local Script = game.ServerScriptService.GamePassDoubleJump |
3 | local LScript = game.ServerScriptService.GamePassDoubleJump.DoubleJump |
4 | local scriptclone = LScript:clone() |
5 | game.Players.PlayerAdded:connect( function (player) |
6 | if game:GetService( "GamePassService" ):PlayerHasPass(player, id) then |
7 | scriptclone.parent = game.Players.LocalPlayer.PlayerScripts |
8 | end |
9 | end ) |
i have no idea why it isn't working.
PlayerHasPass() is outdated, Here is the updates version, from now on, use game:GetService("MarketPlaceService"):UserOwnsGamePassAsync(player.UserId, id)
1 | local id = 5010007 |
2 | local Script = game.ServerScriptService.GamePassDoubleJump |
3 | local LScript = game.ServerScriptService.GamePassDoubleJump.DoubleJump |
4 | local scriptclone = LScript:clone() |
5 | game.Players.PlayerAdded:connect( function (player) |
6 | if game:GetService( "MarketplaceService" ):UserOwnsGamePassAsync(player.UserId, id) then |
7 | scriptclone.parent = game.Players.LocalPlayer.PlayerScripts |
8 | end |
9 | end ) |
Let me know if this works :)
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:
im not good with marketplace service stuff, but in the error it says use MarketPlaceService and PlayerOwnsAsset instead, so maybe like this:
1 | local id = 5010007 |
2 | local Script = game.ServerScriptService.GamePassDoubleJump |
3 | local LScript = game.ServerScriptService.GamePassDoubleJump.DoubleJump |
4 | local scriptclone = LScript:clone() |
5 | game.Players.PlayerAdded:connect( function (player) |
6 | if game:GetService( "MarketplaceService" ):PlayerOwnsAsset(player, id) then -- changed this |
7 | scriptclone.parent = game.Players.LocalPlayer.PlayerScripts |
8 | end |
9 | end ) |