I made a table with listed parts of a player. I'm trying to have my script go to the player who died, Anchor them then make them CanCollide false. I'll be adding more but this is currently not working as it is.
BodyParts = {Head,Torso,("Left Arm"),("Left Leg"),("Right Arm"),("Right Leg")}--6
game:GetService('Players').PlayerAdded:connect(function(player)
player.CharacterAdded:connect(function(character)
character:WaitForChild("Humanoid").Died:connect(function()
for i,v in pairs(BodyParts) do
player.v.Anchored = true
player.v.CanCollide = false
end
end)
end)
end)
What I'm planing to do is have the script go to my table and find each listed part, Change then change there properties when they die. But I keep getting the error V is not a valid member of Player Basically trying to make my own death effect.

1 comment
A side question... Is there a way to reduce the time the body parts repsawn?