You can write your topic however you want, but you need to answer these questions:
-
What do you want to achieve? Keep it simple and clear!
A system where if a player dies in a R6 rig, his body gets ragdolled and remains on the floor for a minute or so. i have a r15 version, but the body stays forever and the ragdolled body is visible only for the server. -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
ive gotten support from some creators but the problem remained the same…
script goes to serverscriptservice.
local players = game:GetService("Players")
local function makeRagDoll(doll)
for index, joint in pairs (doll:GetDescendants()) do
if joint:IsA("Motor6D") then
local socket = Instance.new("BallSocketConstraint")
local a1 = Instance.new("Attachment")
local a2 = Instance.new("Attachment")
a1.Parent = joint.Part0
a2.Parent = joint.Part1
socket.Parent = joint.Parent
socket.Attachment0 = a1
socket.Attachment1 = a2
a1.CFrame = joint.C0
a2.CFrame = joint.C1
socket.LimitsEnabled = true
socket.TwistLimitsEnabled = true
joint:Destroy()
end
end
end
local function makeDup(char)
char.Archivable = true
local dChar = char:Clone()
char.Archivable = false
dChar.Parent = workspace
for i, v in pairs(char:GetDescendants()) do
if v:IsA("BasePart") then
v.CanCollide = false
v.Anchored = true
v.Transparency = 1
end
end
local healthScript = dChar:FindFirstChild("Health")
if healthScript then
healthScript.Enabled = false
end
if dChar then
makeRagDoll(dChar)
else
warn("No Character Duplicate!")
end
end
players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local hum = char:WaitForChild("Humanoid")
hum.Died:Connect(function()
print("Player Has Died!", player.Name)
makeDup(char)
end)
end)
end)
Thanks again for reading
(yes this is a repost cuz i haven’t gotten any help, if i cant do anything i might try researching again)