Hello why doesn’t this code works?
there is no error in the output occuring
code:
local tool = script.Parent
tool.Equipped:Connect(function()
local char = tool.Parent
if char:FindFirstChild("ClassicSwordAccessory") then
char.ClassicSwordAccessory:Destroy()
end
end)
tool.Unequipped:Connect(function()
local char = tool.Parent
if not char:FindFirstChild("ClassicSwordAccessory") then
game:GetService("ServerStorage").Accessories.ClassicSwordAccessory:Clone().Parent = char
end
end)