It's not working, may someone help me fix it?
local gear = Game.Lighting.flag local GamePassId = 163409880 -- This is the right gamepass id Game.Players.PlayerAdded:connect(function(Player) Player.CharacterAdded:connect(function() if Player.StarterGear.flag ~= true then local gearClone = gear:clone() gearClone.Parent = Player.StarterGear wait(0.1) local gearClone2 = gear:clone() gearClone2.Parent = Player.Backpack print("Success") end end) end)
local gear = game.Lighting.flag --Lua is case sensitive, it's game not Game. local GamePassId = 163409880 -- This is the right gamepass id game.Players.PlayerAdded:connect(function(Player) --Lua is case sensitive, it's game not Game. Player.CharacterAdded:connect(function() if game:GetService("MarketplaceService"):PlayerOwnsAsset(Player ,GamePassId) then --You wanted the script to be a VIP script right? local gearClone = gear:clone() gearClone.Parent = Player.Backpack --StarterGear is not a member of Player, Backpack is though. wait(0.1) local gearClone2 = gear:clone() --Why give them two? gearClone2.Parent = Player.Backpack print("Success") end end) end)
The script will only work in online mode, if you experience errors there, then press F9 and tell us the output (red part with some blue lines explaining the problem).
I don't see why a admin has noted this answer, I did give explanation why the code was not working as intended, and that was because Starterpack is not in Player.