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

Error with a startergui gamepass purchase for gear. Any solutions?

Asked by
xp5u 25
3 years ago
Edited 3 years ago
local mps = game:GetService("MarketplaceService")
local button = script.Parent
local player = game.Players.LocalPlayer
local Value = script.Parent.Gamepass

button.MouseButton1Click:connect(function()
    mps:PromptGamePassPurchase(player, Value)
end)

mps.PromptGamePassPurchaseFinished:Connect(function(player, id, purchased)
    if id == Value and purchased then
        game.ReplicatedStorage.GiveWarp:FireServer()
    end
end)

It is a localscript in startergui

Error: Unable to cast Instance to int64 - Client - LocalScript:7

Answer this question