I am trying to make a brick give people a linked sword and when people fall through it (cancollide is false) it gives them 10 instead of one, here is the code. Please help.
script.Parent.Touched:connect(function() for i, v in pairs(game.Players:GetChildren()) do if v.Backpack ~= nil then clone = game.Lighting.LinkedSword:Clone() clone.Parent = v.Backpack end end end)
script.Parent.Touched:connect(function() for i, v in pairs(game.Players:GetChildren()) do if v.Backpack ~= nil then if v.Backpack:FindFirstChild("LinkedSword") == nil then --will make sure its not in the bag first clone = game.Lighting.LinkedSword:Clone() clone.Parent = v.Backpack end end end end)