How Do I Fix Walk Stuttering?

Hello! I made a ragdoll and I am on the final step of it, I have scripted rebuilding and everything. The only problem is, that the player shifts to the walking animation/slows down right when you let go of “W”, so it moves for an extra second. How do I fix this?
Whenever the player moves it also feels weird compared to the normal movements.

https://gyazo.com/1c8738eb316771e334af05732fb531f8

Script for rebuilding:

function Ragdollmodule:Rebuild(character,Backtable)
	character.Humanoid.BreakJointsOnDeath = true
	character.Humanoid.RequiresNeck = true
	local jointTable = Backtable[1]
	local socketTable = Backtable[2]
	local AttachesTable = Backtable[3]
	
	if character:FindFirstChild("HumanoidRootPart") then
		if character.HumanoidRootPart:FindFirstChild("HumWeld") then
			character.HumanoidRootPart.HumWeld:Destroy()
		end
	end
	
	for i, socket in pairs(socketTable) do
		socket:Destroy()
	end
	
	for i, joint in pairs(jointTable) do
		joint.Enabled = true
	end
	
	for i, attach in pairs(AttachesTable) do
		attach:Destroy()
	end
	-- fix the humanoid types
	local hum = character.Humanoid
	character.HumanoidRootPart:SetNetworkOwner(nil)
	
--	hum:ChangeState(Enum.HumanoidStateType.Ragdoll,false)
--	hum:ChangeState(Enum.HumanoidStateType.Physics)

	
	--character.Humanoid.PlatformStand = true
	--character.Humanoid:ChangeState(Enum.HumanoidStateType.PlatformStanding,true)
	hum:ChangeState(Enum.HumanoidStateType.Flying,false)
	hum:ChangeState(Enum.HumanoidStateType.Ragdoll,false)
	hum:ChangeState(Enum.HumanoidStateType.Physics,false)
	--hum:ChangeState(Enum.HumanoidStateType.PlatformStanding,false)
	--hum:ChangeState(Enum.HumanoidStateType.Physics,false)
	--hum:ChangeState(Enum.HumanoidStateType.None)
--	hum:ChangeState(Enum.HumanoidStateType.Ragdoll,false)
--	hum:ChangeState(Enum.HumanoidStateType.Physics,false)
	--hum:ChangeState(Enum.HumanoidStateType.PlatformStanding,false)
	--hum:ChangeState(Enum.HumanoidStateType.Physics,false)
	--hum:ChangeState(Enum.HumanoidStateType.Freefall,false)
	--hum:ChangeState(Enum.HumanoidStateType.GettingUp)
	character.Humanoid.PlatformStand = false
	hum:ChangeState(Enum.HumanoidStateType.PlatformStanding,false)
	
	hum.AutoRotate = true
	hum.WalkSpeed = 16
	character.PrimaryPart.CanCollide = true
	character.Animate.Disabled = true
	character.Animate.Disabled = false
	hum:ChangeState(Enum.HumanoidStateType.GettingUp)
	
	local plr = game.Players:GetPlayerFromCharacter(character)
	if plr ~= nil then
		game.ReplicatedStorage:WaitForChild("FixPlayerCamera"):FireClient(plr)
	end
	
	hum.PlatformStand = true
	hum.PlatformStand = false
	hum:ChangeState(Enum.HumanoidStateType.None)
	hum:ChangeState(Enum.HumanoidStateType.GettingUp,true)
	
end

You could try disabling the player’s controls (Or set walk speed & jump power to 0) when the player dies

Well the player isnt dying, and I already set it to 0, it is just that when the ragdoll is rebuilt, when the player walks, they stutter at the end and start, and stutter when they jump.

Sorry I’m slightly confused, is the rag doll a completely new and different model than the original player character?

No, same exact player, it is their character where the motor6ds are disabled, I can send the ragdoll script too if needed.

Can you send a video or gif of the stuttering?

I put one in the desc, but I will send a better one here.

Ohhh I see what you’re talking about, the player kind of slides after you stop moving right?

1 Like

Yeah, and jumping it stutters, the sliding, and when turning around it does the slow walking animation for a second but switches.
Bomb Investigation - Roblox Studio - Gyazo

Honestly just looks like the charcter’s network ownership isn’t set to the player

try setting it with: Character.PrimaryPart:SetNetworkOwner(Player)

1 Like

Ah! I see, it is working perfectly now! Thank you so much for your help! I have been struggling with this problem for ages!

1 Like