natxnek
(777_natxnek)
October 13, 2023, 6:53pm
#1
What do you want to achieve? Ragdoll physics that doesn’t have a seizure after ragolling
What is the issue?
What solutions have you tried so far? I didn’t find the correct solution
function RagdollPlayer(Character : Model)
Character:FindFirstChildWhichIsA("Humanoid").BreakJointsOnDeath = false
Character:FindFirstChildWhichIsA("Humanoid").RequiresNeck = false
Character:FindFirstChildWhichIsA('Humanoid').PlatformStand = true
Character:FindFirstChildWhichIsA('Humanoid').AutoRotate = false
Character:FindFirstChildWhichIsA('Humanoid').WalkSpeed = 0
for _, v in pairs(Character:GetDescendants()) do
if v:IsA("Motor6D") then
local Att0, Att1 = Instance.new("Attachment"), Instance.new("Attachment")
Att0.CFrame = v.C0
Att1.CFrame = v.C1
Att0.Parent = v.Part0
Att1.Parent = v.Part1
local BSC = Instance.new("BallSocketConstraint")
BSC.Attachment0 = Att0
BSC.Attachment1 = Att1
BSC.Parent = v.Part0
BSC.LimitsEnabled = true
BSC.TwistLimitsEnabled = true
v:Destroy()
elseif v:IsA('BasePart') then
v.CanCollide = true
end
end
Character.HumanoidRootPart.CanCollide = false
--Character.Head.CanCollide = true
end
5 Likes
RipGobtain
(CreateTimeExplore)
October 13, 2023, 6:59pm
#2
You need to set the humanoid state to physics, and that BreakJointsOnDeath on the humanoid is turned to false.
2 Likes
natxnek
(777_natxnek)
October 13, 2023, 7:08pm
#3
i’ve did and it didn’t help, also it flies up after i ragdoll
1 Like
RipGobtain
(CreateTimeExplore)
October 13, 2023, 7:12pm
#4
Try making it so the character is handled by the server: “character.HumanoidRootPart:SetNetworkOwner(nil)”
1 Like
natxnek
(777_natxnek)
October 13, 2023, 7:15pm
#5
still. the issue remains the same
1 Like
RipGobtain
(CreateTimeExplore)
October 13, 2023, 7:24pm
#6
There is another forum similar to your issue, try doing it from here:
The title says it.
On Firing Server (player’s alive):
On Humanoid.Died:
Does anyone know why this is happening? I’ve tried killing the humanoid and then making his health full but it dies.
Zerin107
(Zerin)
October 13, 2023, 7:28pm
#7
Try setting CanCollide
on the arms and legs to true after death.
You can also try playing around with BallSocketConstraint.MaxFrictionTorque
1 Like
aidanoldo
(Perkz)
October 13, 2023, 7:38pm
#8
You can try use rope constraint’s instead of ball socket contraints it would look like this:
if v:IsA("Motor6D") and v.Name ~= "Torso" and v.Name ~= "HumanoidRootPart" and v.Name ~= "Head" then
game.Workspace.CurrentCamera.HeadLocked = false
game.Players.LocalPlayer.Character.Humanoid.BreakJointsOnDeath = false
local a0, a1 = Instance.new("Attachment"), Instance.new("Attachment")
a0.CFrame = v.C0
a1.CFrame = v.C1
a0.Parent = v.Part0
a1.Parent = v.Part1
local r = Instance.new("RopeConstraint") -- Change to RopeConstraint
r.Attachment0 = a0
r.Attachment1 = a1
r.Length = 0.1
r.Parent = v.Part0
v.Enabled = false
end
natxnek
(777_natxnek)
October 13, 2023, 7:39pm
#9
i changed the max friction torque to 50 and it doesn’t rotate the arms and legs anymore but the arms and legs go through floor like they don’t have collision even though the can collide is set to true
1 Like
Zerin107
(Zerin)
October 13, 2023, 7:41pm
#10
Are you sure they have CanCollide
true? Try playtesting and checking the properties.
You might have to put a loop or a RunService.HeartBeat
event that changes the collision property
2 Likes
natxnek
(777_natxnek)
October 13, 2023, 7:45pm
#11
it’s set to false when i playtest it but i’m setting it to true in the script
1 Like
Zerin107
(Zerin)
October 13, 2023, 8:09pm
#12
Try changing part.CanCollide = true
to
local connection
connection = RunService.Heartbeat:Connect(function()
if not part.Parent then
connection:Disconnect()
end
part.CanCollide = true
end)
1 Like
0Tenth
(QuackBack)
October 13, 2023, 8:56pm
#13
Make sure that the state of the humanoid is Physics when it’s ragdolled
1 Like
aidanoldo
(Perkz)
October 14, 2023, 9:25am
#14
Wait are you doing the ragdoll through the server?
1 Like
aidanoldo
(Perkz)
October 14, 2023, 9:25am
#15
Yes that should work you need to set it in a localscript though
1 Like
natxnek
(777_natxnek)
October 14, 2023, 10:56am
#16
yes, all of my code is server (the additional code that people suggested me to add is also on the server)
natxnek
(777_natxnek)
October 14, 2023, 10:57am
#17
but other people wouldn’t see the ragdoll
aidanoldo
(Perkz)
October 14, 2023, 12:26pm
#18
So you want to set the humanoid state to physics on the local side and do the ragdoll on the server side and that should work!
natxnek
(777_natxnek)
October 14, 2023, 12:32pm
#19
Now it works but the camera still got the wobble after the ragdoll, how do i disable it??
aidanoldo
(Perkz)
October 14, 2023, 12:37pm
#20
game.Workspace.CurrentCamera.HeadLocked = false