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

[Solved] Why wont the game detect a gamepass purchase?

Asked by 5 years ago
Edited 5 years ago

I just added a gamepass to my game, and my script that detects whether you own it or not works fine in studio, but when I tested the game on Roblox it wouldn't work. Is this just a glitch or did I do something wrong?

local MarketPlaceService = game:GetService("MarketplaceService")
function CheckforPass(userid)
    if MarketPlaceService:UserOwnsGamePassAsync(userid, 5377879) then
        return true
    else
        return false
    end
end
if CheckforPass(game.Players:GetUserIdFromNameAsync(script.Parent.Name)) == true then
    print(script.Parent.Name, " owns the Advanced Defuser Gamepass")    script.Parent.Humanoid.WalkSpeed = 45

end

0
It was just a glitch, the game wasn't updated one23four56 20 — 5y

Answer this question