script.Parent.Touched:Connect(function(touch)
local model = touch.Parent
local plr = game.Players:GetPlayerFromCharacter(model)
local char = plr.Character
local ragdoll = workspace[char.Name]
local torso = ragdoll.Torso
if char and not dbnc then
dbnc = true
char.Humanoid.BreakJointsOnDeath = true
char.Humanoid.Health = 0
local head = blood:Clone()
head.Parent = torso
head.Position = torso.Position + Vector3.new(0,1,0)
head.Orientation = Vector3.new(0,0,0)
head.CanCollide = false
local larm = blood:Clone()
larm.Parent = torso
larm.Position = torso.Position + Vector3.new(-1, 0.2, 0)
larm.Orientation = Vector3.new(0,0,-270)
larm.CanCollide = false
local rarm = blood:Clone()
rarm.Parent = torso
rarm.Position = torso.Position + Vector3.new(1, 0.2, 0)
rarm.Orientation = Vector3.new(0,0,-90)
rarm.CanCollide = false
local lleg = blood:Clone()
lleg.Parent = torso
lleg.Position = torso.Position + Vector3.new(-0.2, -1, 0)
lleg.Orientation = Vector3.new(0,0,-180)
lleg.CanCollide = false
local rleg = blood:Clone()
rleg.Parent = torso
rleg.Position = torso.Position + Vector3.new(0.2, -1, 0)
rleg.Orientation = Vector3.new(0,0,-180)
rleg.CanCollide = false
local weld1 = Instance.new("WeldConstraint")
weld1.Parent = torso
weld1.Part0 = torso
weld1.Part1 = head
local weld2 = Instance.new("WeldConstraint")
weld2.Parent = torso
weld2.Part0 = torso
weld2.Part1 = larm
local weld3 = Instance.new("WeldConstraint")
weld3.Parent = torso
weld3.Part0 = torso
weld3.Part1 = lleg
local weld4 = Instance.new("WeldConstraint")
weld4.Parent = torso
weld4.Part0 = torso
weld4.Part1 = rarm
local weld5 = Instance.new("WeldConstraint")
weld5.Parent = torso
weld5.Part0 = torso
weld5.Part1 = rleg
dbnc = false
end
end)
Yes, none of the parts are anchored.
Yes, the blood parts go to their required place
No, they do not stay there, they fall down.
Blood parts have their collisions off
and hell, i don’t know, im about to go insane
Does the ragdoll object use R6 or R15? R6 would have a single “Torso” object and R15 should have a “UpperTorso” and a “LowerTorso” object. If you are using an R15 rig, try using those.
Alternatively, if that fails, have you tried using the HumanoidRootPart to connect the welds?
You might want to check if the torso of the ragdoll is falling through the floor as well. I can’t see any problems with the welds themselves so far.
Are you also welding these from the client? Sometimes welds can act strangely client-side.
You are breaking the character model’s joints, this is probably creating unexpected behavior of ALSO breaking your own welds you declare later in the script. I think this happens because the Humanoid death event fires AFTER you create your welds.
Try doing this:
char.Humanoid.BreakJointsOnDeath = true
char.Humanoid.Health = 0
char.Humanoid.Died:Wait()
--Rest of code.
That did not work neither… I really don’t know what I did wrong here, the blood parts get cloned, get placed in correct places but they just don’t weld.
Okay, it worked this time. And it looks like the problem is with the BreakJointsOnDeath property. But what can we do about it? My ragdoll script will not disable if I don’t turn on break joints, and turning it on breaks the welds.
char.Humanoid.BreakJointsOnDeath = false
char.Humanoid.Health = 0
char.Humanoid.Died:Wait()
--Manually break the joints
char:BreakJoints()
--Your code...
--Should not break joints because we updated health earlier in the script and the death event already fired.
char.Humanoid.BreakJointsOnDeath = true
How odd! Tell me, what happens to the particle emitters when the joints break? Are they removed from the data model? Do they simply fall through the floor? Are they just not emitting particles anymore?
They just fall out of the map! As I said, the particle emitters get teleported to their places correctly and all of a sudden they just fall to the void! No traces of any sort of weld we created in the script.
When you update a position on a welded part, it all does not move together and causes the welds to break. It is suggested you use CFrame for all parts that are welded.
Uhhh… what exactly do you mean by that? Should I use CFrame to set the positions in the first place or use normal welds and set the c0 and c1 properties or something else??(im extremely sorry for my dumb questions, im really new to this stuff)