So i'm trying to make a gamepass give you some tools. Problem is, I can't actually get it to give the tools.
Output log: 18:49:41.123 - Workspace.Script:11: attempt to index global 'Player' (a nil value)
local passId = 363035405 -- change this to your game pass ID.
function isAuthenticated(player) -- checks to see if the player owns your pass
return game:GetService("MarketplaceService"):PlayerOwnsAsset(player, passId)
end
game.Players.PlayerAdded:connect(function(plr)
if isAuthenticated(plr) then
Weapon = game.Lighting.Grinder:Clone()
Weapon.Parent = Player.Backpack
end
end)
