I've used this starterpack script... I've placed the items I wanted for the teams into Lighting as stated. Put the names of the items into the script. Changed the team colours.
**It works, but instead of putting one of that item into the inventory it duplicates an infinite amount! I then tried to remove the ":clone()" which helped but it would only give one of that item, so if I respawned I would no longer receive it. **
Can someone help and tell me what I did wrong, and possibly help me edit it? NB I am not an advanced scripter or even a basic one.
Here is a copy of the script, changes have been set to fit my needs.
Thanks
script.Parent.Touched:connect(function(hit)
if hit.Parent:findFirstChild("Humanoid") and game.Players[hit.Parent.Name].TeamColor == BrickColor.new("Pastel violet") then
c1 = game.Lighting.MasterKey:clone()
c1.Parent = game.Players[hit.Parent.Name].Backpack
c2 = game.Lighting.Tool:clone()
c2.Parent = game.Players[hit.Parent.Name].Backpack
c3 = game.Lighting.Tool:clone()
c3.Parent = game.Players[hit.Parent.Name].Backpack
c4 = game.Lighting.Tool:clone()
c4.Parent = game.Players[hit.Parent.Name].Backpack
end
end)

2 comments
Please put your script in a code block.
Sorry about that, done.