Custom Character Doesn't Drop Tools

so i made a character for the player(this is actually part two of my problems(i already asked how to pickup the tools))
so he can pickup tools and use them.
but when he picks them up and presses backspace it puts the tool into workspace but doesn’t destroy
the welds
script:

local Service = game:GetService("UserInputService")--Variables
local Character = game.Players.LocalPlayer.Character

Service.InputBegan:Connect(function(obj,bool)--Input
	local tool = game.Players.LocalPlayer.Character:FindFirstChildWhichIsA("Tool")--Variable
	if obj.KeyCode == Enum.KeyCode.Backspace and tool then--When Pressing BackSpace
		print("If Statement Started")--Prints So i Can Check Where It Broke
		tool.Handle.CanTouch = false--Cantouch to false so it wouldn't make any welds 
		Character.RightArm:FindFirstChildWhichIsA("Weld"):Destroy()--destroys the weld (supposed to but doesn't work)
		print("Weld Destroyed")--it never prints this meaning that it never comes to the rest of the script
		tool.Handle.Position = Character.PrimaryPart.Position + Vector3.new(4,4,0)
		print("if statement ended")
		wait(2)
		tool.Parent = workspace--for some reason it still does this though
		tool.Handle.CanTouch = true
	end
end)

this is the script that i use for picking up stuff

local Slime = game.Players.LocalPlayer.Character


local function OnTouched(hit)
		if hit.Parent:FindFirstChild("Humanoid") then return end
	if hit.Parent:IsA("Tool") and hit.Name == "Handle" then
		if hit.Parent.Parent == Slime then--Checks if it's already inside the character so it doesn't make infinite welds
			print("Already In Inventory!")
		else
			hit.Parent.Parent = Slime
				local Weld = Instance.new("Weld")
		Weld.Parent = Slime.RightArm
		Weld.Part0 = Slime.RightArm
				Weld.Part1 = hit
		end
	end
	end

Slime.Humanoid.Touched:Connect(OnTouched)

please help me im getting very annoyed since tools are a big part of my game and if they completely break then there is really nothing to do.

This might work:

local player = game.Players.LocalPlayer
game:GetService("UserInputService").InputBegan:Connect(function(input, process)
    if not process then return end
    if input.KeyCode == Enum.KeyCode.Backspace then
        for _, tool in pairs(player.Character:GetChildren()) do
            if tool:IsA("Tool") then tool.Parent = workspace end
        end
    end
end)

If it doesn’t, you’ll need RemoteEvents to tell the server to drop the tool.

your script does everything except Destroying the weld…
it drops the tool but it’s still stuck to the players right hand.
i’ve tried modifiying it so it would destroy the weld but it doesn’t.
here is the modified script:

local player = game.Players.LocalPlayer
game:GetService("UserInputService").InputBegan:Connect(function(input, process)
	if not process then return end
	if input.KeyCode == Enum.KeyCode.Backspace then
		for _, tool in pairs(player.Character:GetChildren()) do
			if tool:IsA("Tool") then 
				tool.Parent = workspace
				if	tool:FindFirstChildWhichIsA("Weld") then
				 tool:FindFirstChildWhichIsA("Weld"):Destroy()
				end
			end
		end
	end
end)

I think if you parent to the workspace on the server, it will drop the tool.

1 Like