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

Gamepass Script not working, used to work, Any Ideas? Roblox messing with us again im guessing?

Asked by 5 years ago
local GamePassId = 4451626 --- Gamepass ID
tools = {"Sapper Tool"}  --- Tool

local MarketplaceService = game:GetService("MarketplaceService")

function respawned(char)
    player = game.Players:FindFirstChild(char.Name)
    if player.TeamColor==BrickColor.new("Fog") then
        script.Parent["Sapper"].disabled = true
    elseif player.TeamColor==BrickColor.new("Laurel green") then
        script.Parent["Sapper"].disabled = true
    elseif char:FindFirstChild("Head") ~= nil then
        if MarketplaceService:UserOwnsGamePassAsync(player.UserId,GamePassId)
        then
        print('player owns pass')
            for i = 1,#tools do
                game.ServerStorage.Gamepasses:FindFirstChild(tools[i]):Clone().Parent = player.Backpack
            end
        end
    end
end

game.Workspace.ChildAdded:connect(respawned)
0
What's it supposed to do? I changed the Id to a gamepass I own and it printed "player owns pass" User#1007 6 — 5y
0
It's meant to give a tool but it dosent. Moo_Blinder 18 — 5y
0
Just re-ran the script again, it works, sorry for the inconvienence Moo_Blinder 18 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago

Just re-ran the script again, it works, sorry for the inconvienence

Ad

Answer this question