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

Gamepass items not functioning ?

Asked by 3 years ago

I've made two gamepasses for my game. A speed coil and a grapple hook game pass. I've got so far that you can buy them using a button and the items actually deliver to your inventory! However, the items are not functioning. For example: speed coil doesn't give speed (I've put the most voted speed coil model in the replicated storage, also tried another one, neither of them worked).

This is the script I put StarterGui

local player = game.Players.LocalPlayer
local ownsGamepass = game:GetService("MarketplaceService"):UserOwnsGamePassAsync(player.UserId,20553452) 

if ownsGamepass then
    local sword = game:GetService("ReplicatedStorage"):WaitForChild("SpeedCoil"):Clone() 
    sword.Parent = player.Backpack
end

And this is what I put into the TextButton:

script.Parent.MouseButton1Click:Connect(function()
    game:GetService("MarketplaceService"):PromptGamePassPurchase(game.Players.LocalPlayer,20553452)
end)

Any help?

Answer this question