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

How do I make gamepasses work these days?

Asked by 6 years ago

ROBLOX has changed the IDs of gamepasses, and it's been driving me crazy. I've tried making them work with MarketplaceService, and GamePassService, and nothing works. Here's the script i have right now:

local Tools = script.Items:GetChildren()
local GamepassID = script.Configuration.GamepassID.Value

function GiveTools(Player)
    wait(0.5)
    if game:GetService("GamePassService"):PlayerHasPass(Player, GamepassID) then
        for _,Tool in pairs(Tools) do
            local NewTool1 = Tool:Clone()
            NewTool1.Parent = Player.Backpack
            local NewTool2 = Tool:Clone()
            NewTool2.Parent = Player.StarterGear
        end
    end
end

game:GetService("Players").PlayerAdded:connect(GiveTools)

Can anyone help?

0
Won't help you but change :connect to :Connect User#20388 0 — 6y
0
There is no difference between them. Rezault 0 — 6y

Answer this question