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

How to move a script from ReplicatedStorage to StarterPlayerScripts? [closed]

Asked by 3 years ago

Hello my name is Nick and i want to do a gamepass wich is double jump so i want to use this script if a olayer owns the gamepass he can double jump but i dont know how please help me

PassId = 1234567890 --My gamepass ID game:GetService("Players").PlayerAdded:connect(function(Player) if game:GetService("GamePassService"):PlayerHasPass(Player, PassId) then --Here i want to put the script that makes the gamepass work but idk how end end)

Closed as Non-Descriptive by User#6546

This question has been closed because its title or content does not adequately describe the problem you are trying to solve.
Please ensure that your question pertains to your actual problem, rather than your attempted solution. That is, you were trying to solve problem X, and you thought solution Y would work, but instead of asking about X when you ran into trouble, you asked about Y.

Why was this question closed?

1 answer

Log in to vote
0
Answered by
Xapelize 2658 Moderation Voter Community Moderator
3 years ago

:PlayerHasPass() is deprecated, you cannot use it for new gamepasses. Use :UserOwnsGamePassAsync() instead.

This is a sample script of how to let the player get the GamePass GUI prompt.

PassId = 16578690

game:GetService("Players").PlayerAdded:Connect(function(player)
    game.MarketplaceService:PromptGamePassPurchase(player, PassId)
end)

This is a sample script of how to detect if the player owns a gamepass:

PassId = 16578690

game:GetService("Players").PlayerAdded:Connect(function(player)
    if game.MarketplaceService:UserOwnsGamePassAsync(player.UserId, PassId) then
        print(tostring(player.Name) .." owns the gamepass!")
    end
end)
0
Oh okay but the main problem is how can i move a script from ReplicatedStorage to StarterPlayerScripts? AIRBORNENicuYT 20 — 3y
Ad