Making stuff float on death

So, I’m trying to make stuff float on the Players Death by using AlignPosition if thats what I’m supposed to be using, but when they die, it doesnt work, and I’m confused why as it works with other things besides limbs.

Script:

hum.Died:Connect(function()
	if InWater then -- if the Player is in Water (as in a BasePart)
		for _,v in char:GetChildren() do -- iterates through all children
			if not v:IsA("BasePart") then continue end -- skips if not a BasePart
			local ap, att = Instance.new("AlignPosition"), Instance.new("Attachment")
		   -- creates Instances	
           -- Applying Properties:

           -- Attachment Properties
			att.Parent = v
			att.WorldCFrame = v.CFrame
			
		    -- AlignPosition Properties
			ap.Mode = Enum.PositionAlignmentMode.OneAttachment
			ap.ApplyAtCenterOfMass = true
			ap.Attachment0 = att
			ap.Position = v.Position
			ap.Parent = v
		end
	end
end)

And I doing this wrong?

1 Like

Are you attempting to make the player bodyparts float in water if they die? For that, can’t you set their Massless property to false?

Everytime I have ever used Massless, it never did anything.

Could it possibly work now?

1 Like

Nope, It still forces the player to fall to the ground.

You should take advantage of VectorForce. Similar to this:

Expect you’re not flipping gravity, just slowing it down for each part.

I don’t know if it has something to do with the fact that the server can’t apply velocity to player characters. But you could try making invisible parts weld the limbs to those and make the invisible ones float

Small Update: It appears to be working when the Player is alive and their limbs are attached, but not when they are dead.

By float do you mean float on water?

I mean as in the object stays in place, and is able to rotate, but yes.

Have you tried changing its density?