Hello everyone, basically when my tool is equipped, it just spawns in the air and falls down and through the ground.
It is a tool, with three children, the script, the handle and the hitbox. The original sword used to be a model but I ungrouped it and put all the parts inside the handle. I also have weld constraints on everything.
When in StarterPack, the sword is in my hand, and works normally and moves along with me. But when I use this script below to equip it, it spawns where the sword is in ReplicatedStorage and then falls down and then through the ground, and only the handle part is in my hand.
local char = plr.Character
local backpack = plr:WaitForChild("Backpack")
local newTool = rs:WaitForChild("Tools"):WaitForChild(toolName):Clone()
newTool.Parent = backpack
Is this a problem with the script, or the sword or anything else?
just to be sure, the code you shown is to manually clone the tool into your backpack. i believe at this point, it is not visible yet.
Then you find out if tool was in the default StarterPack, when you equip the tool, it goes to your hand no problem; but if tool is cloned into backpack, when you equip the tool, it goes down the ground?
Could you check how it behave differently if it were in the StarterPack?
to my knowledge, the tool will be cloned into Player’s Backpack, so it would have same “unachored” property in the backpack, unless the default StarterPack → Player Backpack also modified a few of the properties.
put tool into StarterPack, run the game, go to Explorer > Players > [yourself] > Backpack
the tool is there, check its properties.
it should not be visible at this point i think.
then equip the tool, it is now moved to Explorer > Workspace > [your character]
the tool should be weld to your hand. check its properties
Then, use your method, run the game, Clone tool from replicated storage into Player Backpack. check its properties.
then equip the tool, and check its properties again (or print out some of its properties, and check if it has the Weld)
Yes, it is invisible when in Backpack. But when equipped, it becomes visible, and even with all the parts and welds, it still doesn’t attach to the handle which is in the player’s hand
i dont think the cloning make it not work. so how did you equip the tool?
any scripts in the tool that may spill out errors? that might make the equip process error out and not creating the handle weld