How to replace RightGrip with a Motor6D

  1. What do you want to achieve?
    I want to replace the RightGrip for a tool with a motor6d to animate with moon animator.

  2. What is the issue?
    When I try replacing RightGrip it just deletes RightGrip and no Motor6D is created (When I am clearly making a new Motor6D and parenting it to Right Arm)

  3. What solutions have you tried so far?
    I can’t think of anything else to do. It just won’t work when it should just work.

Here is my code:

    tool.Equipped:Connect(function()
		local a:Weld = player.Character:FindFirstChild("Right Arm"):WaitForChild("RightGrip")
		m6d = Instance.new("Motor6D")
		m6d.Parent = player.Character:FindFirstChild("Right Arm")
		m6d.Name = "RightGrip"
		m6d.Part0 = a.Part0
		m6d.Part1 = a.Part1
		m6d.C0 = a.C0
		m6d.C1 = a.C1
		a:Destroy()
	end)
	
	tool.Unequipped:Connect(function()
		mouse.Icon = ""
		m6d:Destroy()
	end)

When I check the right arm there is no motor6d named rightgrip and the tool is floating in the air (unanchored).

Try parenting the Motor6D right after removing the weld.

1 Like

Same thing happens


image

Where is the handle of the tool located when that happens?

WAIT. Its cuz im doing it client sided. Just realized this lmao.

I’m not sure if that would be the cause of the issue, does making the script a server script actually work?

1 Like

Yes it fixed the issue.
30hdsasdjassdasdd

2 Likes

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