Tool not working correctly

Hello,

So i’ve been making tools when you interact with something but it doesn’t works how I want it to work.

This is what it needs to be;

  • When the player interacts with a box then the tool is getting cloned to the player’s backpack.(the tool is in fact a tool)

The above works just fine but when I equip the tool the box is not in the arms of the player but it is visible randomly.

Can someone help me with this?

Can you please send the code that you’re using? Not much that we can do without this. :flushed:
How should the player interact with the box? Can we see this being tested at all?

script.Parent.Triggered:Connect(function(player)
	if not player.Backpack:FindFirstChild("BoxTV") then
		local tool = game.ReplicatedStorage.PackageTools.OldTv.BoxTV
		tool.Parent = player.Backpack
	
		game.Workspace.OldTvPackage1:Destroy()
	else
		print("You can't carry two boxex at once!")
	end
end)


image
image

I think the problem is not with scripting, but the tool itself. Can you show us the properties of the parts inside tool? Most likely you don’t have a part named “Handle” or its anchored property set to true. I’m not an expert with a tools, but i think proper way to make a tool would be:

  • Create a tool instance
  • Put all parts you want to be in the tool inside tool instance. Make them all CanCollide false and Anchored false.
  • Name one of the parts “Handle” or create a new part make it invisible and name it Handle put it where you would like player’s hand to be. Put that part inside tool instance and make it also CanCollide false and Anchored false.
  • Weld all of the parts inside tool to a part named “Handle”.

I think that’s how you create tool that will look fine.

Edit: Does box moves when you move? If so then you would need to change Tool Grip. There are plugin that allows you to easily edit it. Forgot its name though

1 Like

I named one of the children Handle otherwise it wont be able to equip. And I also unanchored it.

And no the tool doesn’t moves when I move.

First off, let’s not work with the same thing to make it easier for you.

  1. You want the player to have a BoxTV in their inventory, clone it from your path and name it “BoxTV2”.

  2. Make the parent of BoxTV2 to - ReplicatedStorage - PackageTools - OldTv.

  3. Change your script to the following:

script.Parent.Triggered:Connect(function(player)
	if not player.Backpack:FindFirstChild("BoxTV2") then
		local tool = game.ReplicatedStorage.PackageTools.OldTv.BoxTV2
		tool.Parent = player.Backpack
	
		game.Workspace.OldTvPackage1:Destroy()
	else
		print("You can't carry two boxex at once!")
	end
end)
  1. Search up “qperfectionweld” in workspace and add it to the BoxTV2, then try it out.

image
image

in the second picture i get teleported to the box…

is it anchored? if it is anchored, then it will teleport you to the box

No, its not anchored… So why does it teleports me then?

can you still move when your teleported?

Yes, but not directly I need to wait somewhere around 5 secs first.

Right, and did you edit the tool grip position?