Tool spawning midair

So I made a tool that has requireshandle off and I’m using it with a script that would weld the tool to the player

This is what happens when you walk forward

But
this is what happens when you stand still or walking backwards

It really breaks the immersion, and also here’s the weld code if you want to look at it

game.Players.PlayerAdded:Connect(function(plr)			
	plr.CharacterAdded:Connect(function(char)		
		local M6D = Instance.new("Motor6D", char["Right Arm"])
		M6D.Name = "ToolGrip"
		M6D.Part0 = M6D.Parent

		char.ChildAdded:Connect(function(child)
			if child:IsA("Tool") and child:FindFirstChild("BodyAttach") then
				M6D.Part1 = child.BodyAttach
			end
		end)
	end)
end)

Alright so you have to do 2 things client-sidedly.

  1. OnUnequip → Parent the tool to somewhere else (you will probably have to parent it back)
  2. OnEquip → Motor6d the attachment as well

Running this both on the server and client will make it as smooth as possible.

I’ll give it a shot, ill mark it if it works

1 Like

alright so I have a question, what will parenting the tool somewhere else actually do? wouldn’t it have the same position?

P.S.: BodyAttach is a part not an attachment

I tried doing just that and what I get in return is

“Something unexpectedly tried to set the parent of [Tool] to [Player] while trying to set the parent of [Tool]. Current parent is Backpack.”

I tried serversided and clientsided, doesn’t work

on client it would just return that but on the server side the tool just stopped working

Ok, i fixed it. I just move the motor6d script into the tool’s script itself

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.