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

How to make an gamepass that makes player jump higher?

Asked by 2 years ago
Edited 2 years ago

local gampass_id = 35168372

script.Parent.MouseButton1Click:Connect(function() game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer, gampass_id)

end)

gamepass link: https://www.roblox.com/game-pass/35168372/thx

2 answers

Log in to vote
0
Answered by 2 years ago
Edited 2 years ago

Use humanoid.JumpPower to change it. I made a script for you (server-sided):

local gamepass_Id = 35168372
local MarketplaceService = game:GetService("MarketplaceService")

game.Players.PlayerAdded:Connect(function(player)
    player.CharacterAdded:Connect(function(character)
        if MarketplaceService:UserOwnsGamePassAsync(player.UserId, gamepass_Id) then
            character:WaitForChild("Humanoid").JumpPower = 50 -- Change to any amount you like
        end
    end)
end)
0
where do I put it? In server script? Or in local server script? Or somewhere else? komanos212 2 — 2y
0
I've put it in server script service in normal script. ERROR: 12:16:29.474 UserOwnsGamepassAsync is not a valid member of MarketplaceService "MarketplaceService" - Server - Script:6 komanos212 2 — 2y
0
Oh, sorry, use UserOwnsGamePassAsync instead because `Pass` is uppercase GamerLighting23233 63 — 2y
0
17:00:21.030 UserOwnsGamepassAsync is not a valid member of MarketplaceService "MarketplaceService" - Server - Script:6. U meant to use Pass instead of UserOwnsGamePassAsync? Cuz i dont see any "pass" in the script komanos212 2 — 2y
View all comments (5 more)
0
I used if MarketplaceService:PromptGamePassPurchase(player, gamepass_Id) then komanos212 2 — 2y
0
It shows me info to buy gamepass on the start of the game, but then nothing. My charcher doestn jump higher. And btw wdym by saying ,,Use humanoid.JumpPower to change it"? komanos212 2 — 2y
0
Do not use `UserOwnsGamepassAsync` but use `UserOwnsGamePassAsync` Sorry i made a typo, Pass must be uppercase. You are still using the same string as before GamerLighting23233 63 — 2y
0
14:58:17.982 Unable to cast Instance to int64 - Server - Script:6 komanos212 2 — 2y
0
Instead of player use `player.UserId` GamerLighting23233 63 — 2y
Ad
Log in to vote
0
Answered by 2 years ago

Please research more on this before asking a question, as there are multiple sources that provide an answer to your question.

You can use this Roblox article to figure this out.

0
u meant to send the gamepass link? I saw 2 types of links on this article komanos212 2 — 2y

Answer this question