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

Im makeing a Speed game pass and it wont work Help?

Asked by 4 years ago
Edited 4 years ago

this is my code and it will work in testing in the studio but not in real servers

local id = 5136477

game:GetService("MarketplaceService").PromptGamePassPurchaseFinished:Connect(function(plr,ido,purchased)
    if purchased and ido == id then
        plr.Character.Humanoid.WalkSpeed = 50
    end
end)

game.Players.PlayerAdded:Connect(function(plr)
    plr.CharacterAdded:connect(function(char)
        if game:GetService("MarketplaceService"):UserOwnsGamePassAsync(game.Players[char.Name].UserId, id) then
            char.Humanoid.WalkSpeed = 50
        end
    end)
end)
0
Can anyone help me? MMOOYYEESS 0 — 4y
1
Do you own the gamepass? Or did you make yourself an exception to owning the gamepass? 50ShadesofLamps 5 — 4y
0
I made and own it MMOOYYEESS 0 — 4y
0
It didn't work MMOOYYEESS 0 — 4y
View all comments (3 more)
0
is char.id even a thing? danglt 185 — 4y
0
Yep I just got it working :) I needed to move the script from ServerScript Service to Workspace MMOOYYEESS 0 — 4y
0
That couldn't be the reason; even then, that just allows an exploiter to see the script. TheeDeathCaster 2368 — 4y

Answer this question