this script is meant to remove all your tools into lighting.... but the thing is if you have a tool on your hand like a pistol your using and you still use it when you touch the part it removes everything but the tool your using any help please?
function onTouched(hit)
local p = game.Players:FindFirstChild(hit.Parent.Name)
if p ~= nil then
local kit = p.Backpack
if kit ~= nil then
local tools = kit:GetChildren()
for i = 1,#tools do
wait(.05)
tools[i].Parent = game.Lighting
end
end
end
end
script.Parent.Touched:connect(onTouched)

1 comment
Thank you for helping me out and umm for the bottom part where it says v:Destroy() i changed it to v.Parent = game.Lighting because i want it to be regenerated on touch to another part so thank you so much for the help i tested it and it worked still :)