I've been wondering for along time and never really found out how to do this.
Im not asking for a script, just for a step in the right direction, thank you.
A simpler way of wfvj014's solution would be a loop.
My appologies, I incorrectly connected the "Died" event.
game.Players.PlayerAdded:connect(function(plr) local A = game.Workspace:WaitForChild(plr.Name):GetChildren() game.Workspace:WaitForChild(plr.Name).Humanoid.Died:connect(function() for i,v in pairs(A) do if v:IsA("BasePart") then v.Anchored = true end end end) end)
I'll provide a way of doing this.
Just anchor the player's parts on death
To do this, use a Died Event
. When A player dies, anchor their parts.
Here's an example,
--in a regular script in ServerScriptService game.Players.PlayerAdded:Connect(function(plr) plr.Died:connect(function() plr.Character:FindFirstChild("LeftLeg").Anchored = true plr.Character:FindFirstChild("RightLeg").Anchored = true plr.Character:FindFirstChild("Torso").Anchored = true plr.Character:FindFirstChild("Head").Anchored = true plr.Character:FindFirstChild("LeftArm").Anchored = true plr.Character:FindFirstChild("RightArm").Anchored = true end) end)
You could go through all of the parts and anchor them but I didn't feel like it.
There may be better solutions, this is just my solution.
Good Luck