When a player touches a spawn location, it will delete all his existing tools in his backpack then replace them with tools in Lighting. Why doesn't it work?
script.Parent.Touched:connect(function(hit)
ply = game.Players:GetPlayerFromCharacter(hit.Parent)
if ply then
ply.Backpack:ClearAllChildren()
for i,v in pairs(game.Lighting.Tools:GetChildren()) do
v.Parent = v.Backpack
end
end
end)
Please help! |