local function ragdollPlayer(character)
local humanoid = character:FindFirstChildOfClass("Humanoid")
if not humanoid then return end
humanoid.PlatformStand = true
local hrp = character:FindFirstChild("HumanoidRootPart")
if hrp then
hrp.Anchored = false
end
for _, part in character:GetChildren() do
if part:IsA("BasePart") then
part.CFrame = CFrame.new(part.Position) * CFrame.Angles(math.rad(90), 0, 0)
end
end
task.wait(1)
for _, motor in character:GetDescendants() do
if motor:IsA("Motor6D") then
local name = motor.Name:lower()
if name:find("shoulder") or name:find("hip") or name:find("leg") then
local part0, part1 = motor.Part0, motor.Part1
if part0 and part1 then
motor:Destroy()
part0.CFrame = part0.CFrame * CFrame.Angles(
math.rad(math.random(-20,20)),
math.rad(math.random(-20,20)),
math.rad(math.random(-20,20))
)
part1.CFrame = part1.CFrame * CFrame.Angles(
math.rad(math.random(-20,20)),
math.rad(math.random(-20,20)),
math.rad(math.random(-20,20))
)
part0.Position = part0.Position + Vector3.new(math.random(-1,1), 0, math.random(-1,1))
part1.Position = part1.Position + Vector3.new(math.random(-1,1), 0, math.random(-1,1))
end
end
end
end
if not character:FindFirstChild("Ragdolled") then
local tag = Instance.new("BoolValue")
tag.Name = "Ragdolled"
tag.Parent = character
end
end
#Body parts disappearing
1 messages · Page 1 of 1 (latest)
When I ragdoll the player I want to make the player lay flat on the ground and then seperate the arms and legs. But they just disappear instead of staying on the ground
Please send help 🙏
Did you turn on CanCollide for the limbs? If you're destroying the motor but not CanCollide-ing the limbs, they'll fall through the floor
Oh they arent collidable in the first place?? 💀
Nope