Joint C0 setting to StarterC0 doesn't seems to work

Hi guys, when I reset the joint C0 and set it to the starterC0 it doesn’t works.
As shown here;

Here is code;


local StartRightC0,StartLeftC0,StartNE = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0),CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0),CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
local StartC0RootHip = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, 0);

function Base:ResetJoints()
	print('Cleaning joints!')

	local leftShoulder = Player.Character.Torso:FindFirstChild('Left Shoulder')
	local rightShoulder = Player.Character.Torso:FindFirstChild('Right Shoulder')
	if (leftShoulder and rightShoulder) then
		leftShoulder.C0 = StartLeftC0
		rightShoulder.C0 = StartRightC0
	end

	if (Player.Character.Torso:FindFirstChild('RootJoint')) then
		Player.Character.HumanoidRootPart['RootJoint'].C0 = StartC0RootHip
	end
	if (Player.Character.Torso:FindFirstChild('Neck')) then
		Player.Character.Torso:WaitForChild("Neck").C0 = StartNE
	end
end

It’s printing indeed everything, but it doesn’t works!

Before running :ResetJoints() the loop that updates the arms gets disconnected.

I have done something similar, what I do is that I have a set function for the joint that saves the original C0 in a CframeValue on the joint before modifying.

The reset function just fetches the original value and sets it to C0 if the value exists.

This fixes issues with variance between chars / different scaling on chars etc.

I am doing the same thing, but just stored values, I printed them firstly on the output and stored the C0, but for some reason it doesn’t works.

Are you resetting C1? It could possibly be that.

1 Like

As @SaturdayScandal said, you need to set both Part0, Part1, C0 and C1.

I am not touching the C1, so it shouldn’t be changed. just using the C0 to offset the arm.
@Scottifly

What you mean with htis?
Part0 is the arm and Part1 is the tool, and I am not touching the C1 just the C0 but it doesn’t works

Just try resetting the C1 instead of the C0 since maybe it’s the C1 that’s getting offset during the animation.
I’m just guessing…
In the video the head and both arms seem to be ‘resetting’ their Position aligned to each other, but not to the correct Orientation of the player.

But the C1 isn’t changing :thinking:

They are resetting because the animation, not really because of the C0 since the offset is just for rotating the arm + the animation

I think it might be something else im not touching the C1

It won’t hurt anything to try using C1 instead in your script. If it doesn’t work then just go back to your original setup.
A Weld is the relationship between C0 and C1. If you are having troubles with that relationship then just try leaving C0 alone and changing C1.
Learning is only trying and failing until you succeed. :slight_smile:

Can it be that you output the original C0 before character appearance has loaded? Because that can give funky results with things like this.

nope, the original C0 works fine haha

yeah, but I think I have to change all my code for C1 :sob:

Yo u don’t need to do C1 it might be easier but if u start the game copy and paste the Shoulders position into a CFrame.new() and the orintation into the CFrame.Angles(). then it resets it all