Tool snapping to player when animation plays

Hello, I am having trouble with a tool and its animation. Whenever the tool is equipped, the tool (or spear in this case) seems to snap/teleport to the player

Below is a local script where equipped function is being used:

It goes to a server script which sets up the motor6d for the tool

Typically the first thing done is the motor6d being parented, then the animation playing:

Below is the tool being used:


The weld has Part0 as the handle, and Part1 as the mesh. I’ve tried weld constraints but it has the same issue.

I’ve confirmed that nothing is collidable or anchored. If anyone has experienced this issue before or has any tips it would be much appreciated!

1 Like

Easy fix, move the spear model out of the tool instance and put it inside of replicated storage or somewhere other than the tool.

event.OnServerEvent:Connect(function(Player: Player, Tool: Tool)
	
	-- Player character
	local character = Player.Character
	local right_arm: BasePart = character:FindFirstChild("Right Arm")
	
	-- Mark the character as equipping a weapon
	character.WeaponEquipped.Value = true
	
	-- Get the tool model
	local tool_model: Model = ReplicatedStorage:FindFirstChild(Tool.Name)
	if not tool_model then warn(Tool.Name, "isnt a valid toolmodel") return end
	tool_model = tool_model:Clone()
	
	-- Get the models handle
	local handle: BasePart? = tool_model.PrimaryPart
	
	-- Create the motor to connect the toolmodel and character
	local motor: Motor6D = Instance.new("Motor6D")
	motor.Part0 = right_arm
	motor.Part1 = handle
	motor.C0 = tool_model:FindFirstChild("Value").Value
	motor.Parent = right_arm
	
	-- Parent the tool model
	tool_model.Name = "ToolModel"
	tool_model.Parent = character
	
	-- Your event
	weldComplete:FireClient(Player)
end)

Worked pretty well, thank you!

1 Like

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