Tools Falling Issue

Greetings

This probably has a very easy fix that I’m not seeing, but whenever I equip a tool in my game, the tool just falls and when I equip it, it spawns where the handle was before I put it in ReplicatedStorage and then it falls.

The Script:

function hi(x)

local y = x.Backpack

local z = game.ReplicatedStorage[“Burger Buns”]

z:Clone().Parent = y

end

script.Parent.ClickDetector.MouseClick:connect(hi)

Thanks.

2 Likes

Roblox has an easy to use function for equipping a tool using the Humanoid named EquipTool

An example of this implementation would be as follows:

local tool = toolPrefab:Clone()
tool.Parent = plr.Backpack

hum:EquipTool(tool)

Does this solve my tool falling issue?

EquipTool properly handles the parenting and welding of the tool to the right hand or arm, so yes it should

Okay! I will try this out now, I’ll see if it works.

Can you explain the tool model or provide an image.I’m speculating you have multiple parts that aren’t welded together

Also, the script is

  1. local Players = game:GetService(“Players”)
  • local player = Players:FindFirstChildOfClass(“Player”)
  1. if player and player.Character then
  2. local humanoid = player.Character:FindFirstChildOfClass(“Humanoid”)
  3. if humanoid then
  4. local tool = workspace:FindFirstChild(“Tool”)
  5. if tool then
  6. humanoid:EquipTool(tool)
  7. end
  8. end
  9. end

Would anything break if I changed the ‘local tool = workspace’ to ReplicatedStorage?

Will do that now, one second. Just need to try this script someone suggested,

Does the tool have a handle? Because tools need handles.

1 Like

And another thing, where would the script go?

Yep, it has a handle, I tried it with and without a weld, didn’t work.

What is in the tool? I haven’t been able to confirm my speculations about there being multiple parts besides the handle of tool.

Do you have a part called handle? If so then try setting the tool’s parent to the character of the player. Not sure if that’ll make a difference but that does work for me.

Two unions, which is the actual tool, and one handle with nothing inside.

Are they’re any welded together for them to be able to stay together

https://gyazo.com/943e4d273e994a016cd7aabeaaf90216

Make sure the Tool has a Part named “Handle” (case sensitive)

I see nothing keeping em together u can just weld it urself with weldconstraints or get a plugin

I have added welds they don’t do anything, I also try changing the weld Part0 and Part1 properties and it doesn’t work.

Should I add a weldcontraint to them all?