As the title suggests, I am trying to make it so when the NPC's humanoid health hits 0, it falls thru the floor as break joins on death doesn't work for some reason???
while true do local target = findNearestPlayer(script.Parent.HumanoidRootPart.Position) if target ~= nil then script.Parent.Humanoid:MoveTo(target.Position, target) else if script.Parent.Humanoid.Health == 0 then script.Parent.Head.CanCollide = false script.Parent.HumanoidRootPart.CanCollide = false script.Parent["Ignis Hitbox"].CanCollide = false script.Parent.Ignis1.CanCollide = false script.Parent.Ignis2.CanCollide = false script.Parent.Ignis3.CanCollide = false script.Parent.Ignis4.CanCollide = false script.Parent.Ignis5.CanCollide = false script.Parent.Ignis6.CanCollide = false script.Parent["Left Arm"].CanCollide = false script.Parent["Left Leg"].CanCollide = false script.Parent["Page Left"].CanCollide = false script.Parent["Page Right"].CanCollide = false script.Parent["Right Arm"].CanCollide = false script.Parent["Right Leg"].CanCollide = false script.Parent["Tome Left"].CanCollide = false script.Parent["Tome Right"].CanCollide = false script.Parent["Torso"].CanCollide = false script.Parent.HumanoidRootPart.CanCollide = false end end end
CanCollide = false to true when it false your npc fall thru the floor when true it doesn't if you want breakjoint this code below:
script.Parent:BreakJoints()