Easy to fix problem just brain isn't braining

print("Flinging " .. target.Name)

if player.Character and target.PrimaryPart then
target.PrimaryPart:SetNetworkOwner(player.Character)
target.PrimaryPart.Velocity = Vector3.new(99999, 99999, 99999)
end

So my script flings a target into the void but the target has a custom character that has all R6 body parts. When it reaches the void… instead of dying, it loses all of its baseparts and keeps a perfectly intact humanoid with 100 health. How do you fix this? I want the default behavior… I don’t want to force it to die when it loses base parts.

1 Like

I suggest you add a timer that would kill the humanoid if it’s still alive. That way, it still flings and makes it appear as if they’ve died in the void.

1 Like

That is a valid solution but I am really hoping that someone knows how to force the default behavior. If I have to I could always just use a descendant removing script on the base parts and manually run the default behavior myself. I just don’t want to if I don’t have to.

I don’t believe, for Roblox, there is any such thing as a void.

The only way Roblox will destroy your character is if it falls below the “FallenPartsDestroyHeight” that is set in the Workspace properties panel.

If you want it to die, then you will have to wait for it to fall, or you will need to add a check for distance fron 0,0,0. Or, add a timer of some kind as @Colinchannz said.

2 Likes

You could fade in a black screen just before killing the character.

1 Like

Is your “RequireNeck” Humanoid’s attribute active? I was testing and if it is set to true, the rig dies, and if it is set to false, the humanoid health remains intact as you said.

2 Likes

Basepart.Velocity is deprecated in favour of Basepart.AssemblyLinearVelocity; use that instead.
In addition, it’s better to apply the velocity** on the Character’s HumanoidRootPart directly, since there is a discrepancy between primary parts of RigTypes: R6 uses the head as the primary part, and R15 uses the HumanoidRootPart.

I am going to mark yours as the solution because your deep understanding of the RequireNeck property is how I figured out what was causing this to happen. There is a way to actually bypass the RequireNeck property. The RequireNeck property is very basic and it only applies to regular character’s who have a weld in their Head. If you swap your welds out with custom welds like I did and parent them to a custom part inside of the character’s body, it completely bypasses the RequireNeck property and causes your humanoid to remain intact when it reaches the void. The solution to this is effective server sided code that mimics the exact behavior of a properly welded character with the RequireNeck property enabled. Here’s the code.

local newCharacter = customCharacter:Clone()
newCharacter.Parent = workspace
player.Character = newCharacter
newCharacter.DescendantRemoving:Connect(function(descendant)
if descendant:IsA("BasePart") and #newCharacter:GetDescendants() == 1 and newCharacter:FindFirstChild("Humanoid") then
newCharacter.Humanoid.Health = 0
end
end)

It checks as soon as the character loses all of their base parts from the void and kills them instantaneously. Thank you so much for the help!

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.