( dont mind there being no animations im gonna add )
heres what i want:
if u dont get it, i want the ragdoll to be affected by gravity but its just levitatiing, heres my ragdoll part:
local function applyRagdoll(hitCharacter)
if hitCharacter:FindFirstChild("Humanoid") and not hitCharacter:FindFirstChild("RagdollModel") then
local ragdollModel = script:FindFirstChild("RagdollModel"):Clone()
ragdollModel.Parent = hitCharacter
ragdollModel.Falllol.Disabled = false
local middle = ragdollModel:FindFirstChild("Middle")
if not middle then return end
for _, part in ipairs(ragdollModel:GetChildren()) do
if part:IsA("Part") then
local weld = Instance.new("Weld")
weld.Part0 = middle
weld.Part1 = part
local CJ = CFrame.new(middle.Position)
weld.C0 = middle.CFrame:Inverse() * CJ
weld.C1 = part.CFrame:Inverse() * CJ
weld.Parent = middle
end
end
local torso = hitCharacter:FindFirstChild("Torso") or hitCharacter:FindFirstChild("UpperTorso")
if torso then
local torsoWeld = Instance.new("Weld")
torsoWeld.Part0 = torso
torsoWeld.Part1 = middle
torsoWeld.C0 = CFrame.new(0, 0, 0)
torsoWeld.Parent = torso
end
for _, item in ipairs(ragdollModel:GetChildren()) do
if item:IsA("Part") then
item.Anchored = false
item.CanCollide = true -- Allow parts to collide with the ground
end
end
local humanoid = hitCharacter:FindFirstChild("Humanoid")
if humanoid then
humanoid.PlatformStand = true
end
task.delay(3, function()
if humanoid then
humanoid.PlatformStand = false
end
end)
end
end
This isn’t a particular solution outside of what you are already doing, and I’m sorry if this doesn’t help, but you could try changing the “if item:IsA(“Part”)” line to be:
if item:IsA(“BasePart”)
Since some parts might have physical properties keeping the character up without being an actual part itself.
I fixed it using an int value and detect ing its change in the client, and then change humanoidstates like gettingup to false and ragdoll to true when ragdolled.
Also make sure to push the player when they ragdoll using applyimpulse a little bit.
Another solution is to change the network ownership of the ragdolled player to the player attacking, And also if anyone attacks a player while he’s ragdolled, Change his network ownership to that player that attacked, The network ownership should return to default naturally when the player gets up from ragdoll.
apply impulse is in another function for knockback, i disabled the 2 properties, keep in mind this ragdoll doesnt kill, doesnt work, also the ragdoll stops locomotion of the rig midway stopping the impulse
um ok now it works but it stops apply impulse? should i remove this ragdollmodel stuff to check ( it doesnt delay, it just doesnt happen with ragdoll )
…Interesting, I am afraid I have literally no idea what is going on here… I used this method for my ragdoll engine and it works just fine. Maybe try tweaking around with the code a bit?
nvm i got it to work, found out there was a very slight velocity added to the character in a script in ragdollmodel, removing that fixed it imma mark ur phsyics think as solution though cuz that made it affected by gravity