I'm trying to make it destroy the sword in the backpack.
local Player = script.Parent.Parent.Parent.Parent
script.Parent.MouseButton1Down:connect(function(OnClick)
if Player.Character:FindFirstChild('Sword') == nil then
local TehSword = game.Lighting:FindFirstChild('Sword')
TehSword.Parent = Player.Backpack:Destroy()
end
end)

1 comment
Always use Destroy() when possible since remove() is deprecated!