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