What this does, is if I touch the brick, it will clone my StarterGear and paste it into my backpack. The error I am getting is: Workspace.Weapon Taker.Script.Remove:5:Attempt to call method ('Clone' a nil value)
Here is my code:
function onTouch(obj)
if obj.Parent:findFirstChild("Humanoid")~=nil then
p=game.Players:findFirstChild(obj.Parent.Name)
if p~=nil and p.Chakra.Value == "none" then
ch=p.Backpack:getChildren():Clone()
ch.Parent = p.Backpack
p.Chakra.Value = good
elseif p.Chakra.Value == "good" then
print("good")
end
end
end
script.Parent.Touched:connect(onTouch)

2 comments
Here is the problem, I have a brick in the lobby remove the swords from players, is there a way in my brick that clears their backpack to save that data and send it to this script to paste a clone into the players backpack?
i figured it out, thanks!