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

Gamepass not giving Tool? [SOLVED]

Asked by
Agios 10
9 years ago

The script is supposed to give the player a tool from lighting called VIPWeapon, but it's not doing anything.

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)


        if game:GetService("GamePassService"):PlayerHasPass(player, id) then

        game.Lighting["VIPWeapon"]:clone().Parent = player.BackPack

        end
    end)
end)

Lol I made some pretty stupid mistakes Just re-read it and realized how stupid I was and fixed lol Correct script:

game.Players.PlayerAdded:connect(function(player)
    player.CharacterAdded:connect(function(character)


        if game:GetService("GamePassService"):PlayerHasPass(player, id) then
            local VIPWeapon = game.Lighting.VIPWeapon:Clone()
        game.Lighting["VIPWeapon"]:clone().Parent = player:FindFirstChild("Backpack")

        end
    end)
end)


Answer this question