So I have been working on Texture Packs in my game for Swords and Pickaxes. The code seems to fully work, but when I get the tools and equip them they don’t show up in my hand. There are no errors, nothing. I tried to see what was happening in Studio, but it said that the handle was in the tool and that the player was equipping the tool. Obviously this is a big issue, the only reason I can think of why this is happening is because the tool is cloned, but I have worked with clonning tools in the past and nothing bad has happened.
cosmeticChange.OnClientEvent:Connect(function()
local plr = game.Players.LocalPlayer
local cosmeticName = plr.CosmeticStatus.TexturePack
local weaponStorage = game.ReplicatedStorage.PickaxeAndSwordTextures
if cosmeticName.Value == "Alien" then
local swordClone = weaponStorage:FindFirstChild("Alien").Sword:Clone()
local pickaxeClone = weaponStorage:FindFirstChild("Alien").Pickaxe:Clone()
swordClone.Parent = plr.Backpack
pickaxeClone.Parent = plr.Backpack
elseif cosmeticName.Value == "Default" then
local swordClone = weaponStorage:FindFirstChild("Default").Sword:Clone()
local pickaxeClone = weaponStorage:FindFirstChild("Default").Pickaxe:Clone()
swordClone.Parent = plr.Backpack
pickaxeClone.Parent = plr.Backpack
elseif cosmeticName.Value == "CandyCane" then
local swordClone = weaponStorage:FindFirstChild("CandyCane").Sword:Clone()
local pickaxeClone = weaponStorage:FindFirstChild("CandyCane").Pickaxe:Clone()
swordClone.Parent = plr.Backpack
pickaxeClone.Parent = plr.Backpack
elseif cosmeticName.Value == "Gingerbread" then
local swordClone = weaponStorage:FindFirstChild("Gingerbread").Sword:Clone()
local pickaxeClone = weaponStorage:FindFirstChild("Gingerbread").Pickaxe:Clone()
swordClone.Parent = plr.Backpack
pickaxeClone.Parent = plr.Backpack
end
end)
Btw the “end)” is actually part of the code, idk why it doesn’t show it in it. And also the remote event thing is also part of the code.
-Peter