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

How to make gamepass that gives the player faster walking speed?

local gampass_id = 35168372

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

end)

1 answer

If you want to make a gamepass for speed use this

game.Players.PlayerAdded:Connect(function(plr)

local speed = 30
 
 wait(1)
 local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(plr.UserId, 35168372)

 if ownsGamepass then
  plr.Character.Humanoid.WalkSpeed = speed
 end
   
end)

I think that's how it works..

12 comments

0

it doesn't, but thx for effort

0

What does the error say?

0

nothing, it just doesnt work

0

wait, is there error panel or somthin? How to see errors?

0

Go to the View Tab and Output

0

it says nothing

0

i tried and tried but nothing is in the errors. Only when i delete ) from the ,,end" from my script, but then i can't click my button and this is probably why the error shows.

0

or no wait there is something. 21:04:48.614 MarketplaceService:PromptGamePassPurchase() player should be of type Player - Server - Script:3

0

i've put it in script instead of local script.

0

can u help me plzzzz

0

That error means that you didn't send the gamepass purchase correctly. You need to send the player Instance and the game pass's ID in order to correctly prompt a purchase.

0

how to do that?

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