it wont destroy the item in the backpack
local sword = game.Lighting.Sword
local gun = game.Lighting.Gun
local anotah = game.Lighting.anotahone
local GButton = script.Parent.GButton
local AButton = script.Parent.AButton
local SButton = script.Parent.SButton
local WName = script.Parent.WName
local player = game.Players.LocalPlayer
GButton.MouseButton1Click:connect(function()
WName.Text = gun.Name
gun.Parent = player.Backpack
local clone = sword.Parent
player:FindFirstChild("Sword"):Destroy()
player:FindFirstChild("anotahone"):Destroy()
end)
AButton.MouseButton1Click:connect(function()
WName.Text = anotah.Name
anotah.Parent = player.Backpack
local clone = anotah.Parent
player:FindFirstChild("Sword"):Destroy()
player:FindFirstChild("Gun"):Destroy()
end)
SButton.MouseButton1Click:connect(function()
WName.Text = sword.Name
sword.Parent = player.Backpack
local clone = gun.Parent
player:FindFirstChild("Gun"):Destroy()
player:FindFirstChild("anotahone"):Destroy()
end)

3 comments
If the item is selected it would be in the player's character
I know but I want to delete it from both so it the player cant get the item again until they choose the class
Lighting is a terrible place to store things. That is why ROBLOX made ReplicatedStorage and ServerStorage.