When destroying the R6 neck in roblox, you are known to die/reset immediately - unless you put false to requires neck.
Unlike me, when removing the neck the character isnt dying, while “RequiresNeck” is set to “true”, but confused on how. All my scripts removing joints are on server side.
No other script is handling this.
Expected behavior
If i removed the neck for my R6, keeping the “RequiresNeck” true. My character should be reseting/dying - but its not.
Hi, can you please share a place file we can use to reproduce this issue? I’m seeing an R6 Humanoid correctly die when I delete Neck and have RequiresNeck set to true.
the code i used, requiresneck is set to true and i have no other scripts besides that one
-- //
local Players = game:GetService("Players")
Players.PlayerAdded:Connect(function(player: Player)
player.CharacterAdded:Connect(function(character: Model)
-- //
local Torso
if character:FindFirstChild("Torso") then
Torso = character:FindFirstChild("Torso")
end
-- //
local Neck
if Torso then
Neck = Torso:FindFirstChild("Neck")
end
if Neck then
Neck:Destroy()
end
end)
end)
I see what issue you are facing, this is not even a Roblox bug it’s just how humanoids work this is intentional.
Because you have your joint remover script running at the same time as the character is created. You basically give ZERO TIME for the humanoid to COMPLETELY LOAD so by the time your humanoid does load it tries looking for a neck but it doesnt detect one but since you deleted the neck before the humanoid could register the neck?
Well nothing happens and your basically in this jointless state however resetting your character does still work and you can get killed like normal but it’s a funny humanoid behaviour so the solution to this?
Just add a singular task.wait() to the code before destroying the neck.
In your case:
You did not give the humanoid any time to load and you just went to destroying the neck, if you want a good joint remover or a loopkill, just simply destroy the head or torso otherwise wait a single frame via task.wait then you can run your joint remover code.
Just put task.wait everytime whenever you have code running to DESTROY/REMOVE something upon CharacterAdded you only have to add it once so you can basically just put this on the first line of it
WaitForChild does also work however I’d just play it safe and use task.wait
WaitForChild is like FindFirstChild except if it cant find the object it’ll just wait for it instead but since you are running this on the server I dont think it’ll wait for anything especially if it’s CharacterAdded and your trying to reference the base character such as the Neck, Torso, etc