How to animate an R6 Rig with an object

Now they are no errors and nothing happens only the animation plays, i think it may be because of the handle. Is there a way to disattach a handle at a moment given?

You see where I had put a note inside of the wait function? So go into your Moon Animator, to the animation, then get the frame of where the throw will actually start. If seconds is on, you can check to see what the time of where the keyframe actually plays.

Replace the wait function with the not inside, with the seconds that’s shown for the keyframe. I hope that makes sense.

Then afterwards, I think you could try to unweld the handle from the player after the wait function and take it out of the players backpack.

I deleted the wait function thing and put :GetMarkerReachedSignal and that is working so how would i remove the weld?

Also heres the script right now:

UIS = game:GetService("UserInputService")

script.Parent.Equipped:Connect(function()

	local Humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
	local Animation = script.Parent.ThrowAnimation
	local flagPole = script.Parent.Handle


	if Humanoid and Humanoid.Health > 0 then

		local Animator = Humanoid:FindFirstChild("Animator") or Humanoid
		local PlayAnim = Animator:LoadAnimation(Animation)

		UIS.InputBegan:Connect(function(Input)

			if Input.KeyCode == Enum.KeyCode.Q then

				PlayAnim:Play()
				
				PlayAnim:GetMarkerReachedSignal("ThrowSpear"):Connect(function()
					local bodyVelo = Instance.new("BodyVelocity")

					bodyVelo.MaxForce = Vector3.new(1,0,1) * 30000
					bodyVelo.Velocity = flagPole.CFrame.UpVector * -150 -- I don't know how exactly the animation would look like, but I'm assuming it would be thrown as a spear would. You can change this around if you like.

					wait(0.4)
					bodyVelo:Destroy()
				end)
			end
		end)
	end
end)

Within the GetMarkerReachedSignal, after the wait function, I would say disable the weld for the tool and see if that works.

Are you talking about require handle property?

Nooo, the player is able to hold the weapon since the weapon is welded to the arm. Right?

So within the Weld’s Enabled property, we can toggle it off when it reaches the marker.

Where is the welds enabled property, and how would i turn it off? Im sorry im not good with welds lol

Okay, first of all, how is the tool being held. Like, give me a picture of you holding it. Video if you want to show the animation as well.

So, is there a weld instance inside of the tool or is there a weld instance made from a script?

The only weld in the tool is the welds that hold the flag and the pole together

So how is the player able to hold it. Is the pole called “Handle”?

yes the pole is called handle, and i edited the the way the players hold the pole using a plugin called Tool Grip Editor

OHHHH, Okay okay now I see how you’re doing it.

So no, tools don’t have an enabled function. I think what we should do is after the wait function, we should change the parent of the tool to workspace, then do a wait() function and put the bodyVelocity after that wait function.

UIS = game:GetService("UserInputService")

script.Parent.Equipped:Connect(function()

	local Humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
	local Animation = script.Parent.ThrowAnimation
	local flagPole = script.Parent.Handle


	if Humanoid and Humanoid.Health > 0 then

		local Animator = Humanoid:FindFirstChild("Animator") or Humanoid
		local PlayAnim = Animator:LoadAnimation(Animation)

		UIS.InputBegan:Connect(function(Input)

			if Input.KeyCode == Enum.KeyCode.Q then

				PlayAnim:Play()
				
				PlayAnim:GetMarkerReachedSignal("ThrowSpear"):Connect(function()
script.Parent.Parent = workspace
wait()
					local bodyVelo = Instance.new("BodyVelocity")

					bodyVelo.MaxForce = Vector3.new(1,0,1) * 30000
					bodyVelo.Velocity = flagPole.CFrame.UpVector * -150 -- I don't know how exactly the animation would look like, but I'm assuming it would be thrown as a spear would. You can change this around if you like.

					wait(0.4)
					bodyVelo:Destroy()
				end)
			end
		end)
	end
end)

It looks like im throwing it but then I get it back, what i think is happening is that when its parented to the workspace a touch intrest is created and i keep touching it when im trying to throw it:

I will be back tomorrow its late for me

1 Like

Okay so, you could disable the Touch after it has been thrown, where it moves into the workspace. then re-enable it after the wait(0.4) function.

1 Like

Idk how to disable it I attempted to delete it using this:

script.Parent.ChildAdded:Connect(function(child)
						if child:IsA("TouchTransmitter") then
							child:Destroy()
						end
					end)

Nothing changed though, it does the same thing

UIS = game:GetService("UserInputService")

script.Parent.Equipped:Connect(function()

	local Humanoid = script.Parent.Parent:FindFirstChild("Humanoid")
	local Animation = script.Parent.ThrowAnimation
	local flagPole = script.Parent.Handle


	if Humanoid and Humanoid.Health > 0 then

		local Animator = Humanoid:FindFirstChild("Animator") or Humanoid
		local PlayAnim = Animator:LoadAnimation(Animation)

		UIS.InputBegan:Connect(function(Input)

			if Input.KeyCode == Enum.KeyCode.Q then

				PlayAnim:Play()
				
				PlayAnim:GetMarkerReachedSignal("ThrowSpear"):Connect(function()
script.Parent.Parent = workspace
wait()
					local bodyVelo = Instance.new("BodyVelocity")

					bodyVelo.MaxForce = Vector3.new(1,0,1) * 30000
					bodyVelo.Velocity = flagPole.CFrame.UpVector * -150 -- I don't know how exactly the animation would look like, but I'm assuming it would be thrown as a spear would. You can change this around if you like.

                   script.Parent.Handle:FindFirstChild("TouchInterest").Parent = workspace
					wait(0.4)
					bodyVelo:Destroy()
                   workspace:FindFirstChild("TouchInterest").Parent = script.Parent.Handle
				end)
			end
		end)
	end
end)

We would have to move it out of the tool’s handle for a bit, then move it back into the tool so it can still be picked up.

We can’t just create another one, as said in their library for the instance.