Im having a problem with a pet system using welds

As title says Im having a problem that Im trying to solve for weeks.

I have a rig that all parts are massless and have custom physical properties enabled. And I welded it into player’s humanoidrootpart to make like a pet system. Soo the problem starts when player jump. I dont know whats happening that player weight/gravity gets higher and player jump dont work as correctly.

GIF of my problem:

Without the pet thing:

Thats my problem. The script that Im using:

local PhysicsService = game:GetService("PhysicsService")

local standM = script.Parent
		
		for _, characterPart in pairs (standM:GetChildren()) do
			if characterPart:IsA("BasePart") then
				PhysicsService:SetPartCollisionGroup(characterPart, "Stands")
			end
	end

	standM.HumanoidRootPart.Anchored = false
	
	local Weld = Instance.new("Weld")
	Weld.Parent = standM.HumanoidRootPart
	Weld.Name = "PosWeld"
	Weld.Part0 = standM.HumanoidRootPart
	Weld.Part1 = standM.Parent.HumanoidRootPart
	Weld.C0 = CFrame.new(0,0,0)
	
	standM.HumanoidRootPart.CFrame = standM.Parent.HumanoidRootPart.CFrame

(Sorry if im using the forum in a wrong way.)

Does the model you’re welding to your character have a Humanoid? If so, it is trying to apply its own downward forces by respect of it being a Humanoid. You will need to disable the NPC’s ability to apply forces so that it doesn’t try moving independently of your character.

You can force the Humanoid to stop producing any kind of physics itself by changing its state to Physics. This cannot be exited and must be manually changed out of.

Run this code in the Humanoid you’re welding to your character:

-- I'm assuming the Humanoid in standM is named Humanoid
standM.Humanoid:ChangeState(Enum.HumanoidStateType.Physics)

Two other ways to do this are to set Humanoid.PlatformStand to true or pass PlatformStanding to ChangeState, but those can be exited given instruction and are not advised. If you want to fully control physics yourself (which welding falls under for this case), use the above-provided snippet.

4 Likes

Hello.
If you’re seeking easier solutions, you can simply adjust the player’s jump power, increasing it if there is a pet and reducing it to its normal value when the pet doesn’t exist.
This should work as long as the issue only appears when the character jumps.

Yea my pet thing have a humanoid but I tried your script and set humanoid platformStand and dont worked.

(I just noticed that I need to do that in a local script, its working now. Thanks!)

I tried it but still looks strange soo I want fix it in the right way

This is bad advice and leads up into generating the foundations of an XY problem. This doesn’t resolve the root issue in the OP.

JumpPower is neither an easier solution or a proper one either; it doesn’t address the initial problem where the welded model is causing its own downward force to make the player feel heavy. As well, it is causing undue physics simulation where not necessary.

My solution prevents conflicting downward forces as well as stops physics from being simulated unnecessarily on the Humanoid.