Issues with Rigging

Ok, so I don’t know the first thing about rigging, so I was trying to learn for an upcoming project I am working on as a custom player. And all of these assets are imported from blender. So, I asked ChatGPT as an easy way out as to create a rigg. It did in fact work as of animations, but I put it into the StarterPlayer Service to see if I could walk around with it. That did not work.

ChatGPT Command Bar Code
local function createMotor6D(part0, part1, name)
	local motor6D = Instance.new("Motor6D")
	motor6D.Part0 = part0
	motor6D.Part1 = part1
	motor6D.Name = name
	motor6D.C0 = part0.CFrame:inverse() * part1.CFrame 
	motor6D.C1 = CFrame.new() 
	motor6D.Parent = part0
end

local model = workspace:FindFirstChild("Test")

local function rigModel()

	local head = model:FindFirstChild("Head")
	local torso = model:FindFirstChild("Torso")
	local humanoidRootPart = model:FindFirstChild("HumanoidRootPart")
	local rightShoulder = model:FindFirstChild("RightShoulder")
	local upperRightArm = model:FindFirstChild("RightUpperArm")
	local lowerRightArm = model:FindFirstChild("RightLowerArm")
	local leftShoulder = model:FindFirstChild("LeftShoulder")
	local upperLeftArm = model:FindFirstChild("LeftUpperArm")
	local lowerLeftArm = model:FindFirstChild("LeftLowerArm")
	local rightUpperLeg = model:FindFirstChild("RightUpperLeg")
	local rightLowerLeg = model:FindFirstChild("RightLowerLeg")
	local leftUpperLeg = model:FindFirstChild("LeftUpperLeg")
	local leftLowerLeg = model:FindFirstChild("LeftLowerLeg")

	if head and torso and humanoidRootPart and rightShoulder and upperRightArm and lowerRightArm and leftShoulder and upperLeftArm and lowerLeftArm and rightUpperLeg and rightLowerLeg and leftUpperLeg and leftLowerLeg then
		createMotor6D(humanoidRootPart, torso, "RootJoint")
		createMotor6D(torso, head, "Neck")
		createMotor6D(torso, rightShoulder, "RightShoulderJoint")
		createMotor6D(rightShoulder, upperRightArm, "RightUpperArmJoint")
		createMotor6D(upperRightArm, lowerRightArm, "RightLowerArmJoint")
		createMotor6D(torso, leftShoulder, "LeftShoulderJoint")
		createMotor6D(leftShoulder, upperLeftArm, "LeftUpperArmJoint")
		createMotor6D(upperLeftArm, lowerLeftArm, "LeftLowerArmJoint")

		createMotor6D(torso, rightUpperLeg, "RightHipJoint")
		createMotor6D(rightUpperLeg, rightLowerLeg, "RightKneeJoint")

		createMotor6D(torso, leftUpperLeg, "LeftHipJoint")
		createMotor6D(leftUpperLeg, leftLowerLeg, "LeftKneeJoint")

		print("Model rigged successfully.")
	else
		warn("Model is missing required parts.")
	end
end

if model then
	rigModel()
else
	warn("Model not found in workspace.")
end

Rig SetUp (Image)

Screenshot 2024-07-09 002211

I hope this helps! If you have any more questions on what else this involves, I do not know. But thanks for the help if you can! Also whenever I play the game there is an error message: Infinite yield possible on 'Workspace.Stephenesta_aqui.Torso:WaitForChild("Right Shoulder")'

I personally don’t recommend using ChatGPT for actual code, but I found this video that might help you:

I tried to use that, but it didn’t even let me start creating the welds, like my character was greyed out.

1 Like

mmm the error message is because of the script I believe the “infinite yield possible” is either because something isn’t loading or you have a loop. (I’m not a coder) also, rigging is usually separate from coding? I mean you could create rig via code but most people don’t.

Is there any reason you didn’t make this an R15 rig?

Also

At wich point did this happen? like did you have your character selected? (was there a humanoid inside of the character when you did?)

I can walk you through the process if you want.

So, I’m pretty sure the error is coming from the generic Roblox Character Scripts you get inside of Roblox, basically when you run the game a whole bunch of script gets created by Roblox, that basically help you and your camera move and a few other things, and I don’t think RightShoulder is apart of the Roblox general character. Second, this isn’t created as a regular R15 rig because I am trying to create like a unique character that can walk and interact like a normal R15 rig would, but with more/less complexities to it, basically where it isn’t limited to what Roblox has.

Third, I’m pretty sure it was when I did and did not select it like things were grayed out. Yes, I did have a humanoid, with an animator, and a HumanoidRootPart. If there is another way I can do this please let me know, because this is an absolute first and I don’t know how it works. Also, I am using imported meshes from Blender, so I’m not sure if that changes anything, thank you!

Ok so its going to be a custom rig? It won’t work with r 15 animations because it has more than 15 parts. (if it did work with r15 it would probably just be the head, torsos, and legs)

also for the infinite yield error, do you think you might have something like this going on?

the best way to check is to go into your welds and see which part is part 0 and part 1