Hi! I’ve been experimenting with BreakJointsOnDeath for my planned project.
I think I have noticed an oversight related to animation script when BreakJointsOnDeath is false.
Character plays equip animation and tool is welded to their hand when Health is 0.
GIF of said issue
What do I know about it?
-
Bug happens everytime. Just equip your tool while (or before) your character is dead.
It also works when some of the joints are broken manually - teleporting your hand to place where Tool was. -
Bug happens to me in Studio. I’m not sure if it works online, but I believe it’s related to animation script.
-
If it was my job to fix it, I’d make sure to disable tool based animations in the script.
I believe it needs to be introduced, because creating a new animation script will not allow us to use HumanoidDescriptions. -
Example of a script implementation. I haven’t really tested it, so please don’t rely on it.
-- Line 602 in normal script function onDied() pose = "Dead" stopToolAnimations() end -- Line 657 in normal script function animateTool() if pose == "Dead" then return end -- blah blah blah end -- Line 713 in normal script local tool = Character:FindFirstChildOfClass("Tool") if pose ~= "Dead" and tool and tool:FindFirstChild("Handle") then -- blah blah blah end
Unofficial fix I'm using for now. Call the function once character dies.
local function ToolWeldDisabled()
local tools = {}
local currentTool = character:FindFirstChildWhichIsA("Tool")
if currentTool then
table.insert(tools,currentTool)
end
for _,tool in pairs(backpack:GetChildren()) do
if tool:IsA("Tool") then
table.insert(tools,tool)
end
end
for _,v in pairs(tools) do
local handle = v:FindFirstChild("Handle")
if handle then
handle.Name = ".Handle"
end
end
end