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

howcome when you buy gamepass you have to join another server for it to work?

Asked by 9 years ago

Alright, my question here is that when you buy a gamepass from my game, it doesn't give it to you unless you join another server. Many people have gotten pissed off, because of this. I made a script which it buys gamepass in-game, but thats the problem In which why doesnt my localscript work when you buy the gamepass it gives you the gun directly there in-game. This is the localscript that has a boolvalue of "Act" for it to work on when you click the gui/button.

function hasPass(p,n)
return game.GamePassService:PlayerHasPass(p,n)
end

function boughtPass(p,n)
return game:GetService("MarketplaceService"):PromptPurchase(p,n)
end

script.Parent.MouseButton1Down:connect(function()
if script.Parent.Act.Value == true then
game:GetService("TeleportService"):Teleport(223301477)
else
if hasPass(game.Players.LocalPlayer,223931418) then
script.Parent.Act.Value = true
game:GetService("TeleportService"):Teleport(223301477)
else
boughtPass(game.Players.LocalPlayer,223931418)
game:GetService("MarketplaceService").PromptPurchaseFinished:connect(function(player,ID,b)
if b and ID == 223931418 then
if player == game.Players.LocalPlayer then
script.Parent.Act.Value = true
game:GetService("TeleportService"):Teleport(223301477)
end
end
end)
end
end
end)
1
It is a problem with ROBLOX that has been going on for a while now; You probably have to wait until ROBLOX fixes this, sorry for the inconvenience. :/ TheeDeathCaster 2368 — 9y
0
Alright :/ alan3401 28 — 9y

1 answer

Log in to vote
0
Answered by
SurVur 86
9 years ago

I have no idea if it would work or not but you could try using the BadgeService after they have bought a gamepass. Using the BadgeService you could use :UserHasBadge(userid, assetid). As far as I know, this little trick can be used to figure out whether or not a user has something with an id, not just badges.

Ad

Answer this question