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

How would I put the sword in the players backpack?

Asked by 10 years ago
players = game.Players:GetPlayers()

for i,v in pairs(players) do
            sword = game.Lighting.Sword
            swordclone = sword:clone()
            swordclone.Parent = v.BackPack

1 answer

Log in to vote
3
Answered by
Merely 2122 Moderation Voter Community Moderator
10 years ago

Two small problems:

  1. It's named Backpack, not BackPack.
  2. You forgot an "end" after the for loop.
players = game.Players:GetPlayers()

for i,v in pairs(players) do
            sword = game.Lighting.Sword
            swordclone = sword:clone()
            swordclone.Parent = v.Backpack
end
Ad

Answer this question