I have been trying to find out how to combine other weapons in order to make another weapon, similar to the Epic Katana.
What? hes not asking for anything of the sort- hes asking for information, in no way is he asking anyone to code for him.
Can you give a bit more information on that? Do you already have a sort of inventory set up with like a “crafting/combining” sort of area?
I want the sword to combine on equipped, just like the epic katana (and maybe have an opportunity to animate the tool too)
So what I’m thinking is first placing a bool value in the starterpack, which we could Name HasKatana or something of sorts. Then using the ChildAdded event within the BackpackItem.
We could do if a child was added, and the tool’s name is Katana and HasKatana is equal to false, we’ll make HasKatan true, and then wait for another katana to be added, and in an elseif statement, if HasKatana is equal to true and the child added to the backpack is named Katana, then we can use the :Destroy()
by doing a for loop, such as
This would be a local script in starter player scripts.
local function EPICKATANA()
for i, v in pairs(game.Players.LocalPlayer.Backpack:GetChildren()) do --Gets all the tools in the backpack
if v.Name == "Katana" then
v:Destroy() --Destroys it if there is a Katana
end
end
local EpicKatanaClone = game:GetService("ServerStorage")["Epic Katana"]:Clone() --You'd need to place a tool in the Server Storage named Epic Katana
EpicKatanaClone.Parent = game.Players.LocalPlayer.Backpack --Changes parent to the backpack
end
And now you have an Epic Katana, provided that you have a tool placed in the storage named Epic Katana, and a way to obtain 2 Katana’s, if you have any additional questions, please ask.
I hope this helps.