I have an issue concerning Dynamic Heads. The issue is a weld or attachment to the dynamic head is causing these severe graphical issues. I have rigged meshpart hair attached to the head as an accessory. Sometimes this graphical bug occurs with Dynamic heads.
I have tested 14 dynamic heads and this issue is shared some of them. I’ve been trying to work around this by creating a fake head with the same size and cframe attached to the head and replacing Part1 of the AccessoryWeld with the fake head but this causes other issues with such as BodyWidth and BodyDepth scaling.
With the dynamic heads created by ROBLOX usually the issue is this
This issue is also on the server and is just a graphical bug with objects that are attached to the Dynamic Head. This is causing me a massive headache. What do you guys think?
I have a reproduction file demonstrating 3 Dynamic Heads with 3 different Rigged MeshPart Accessories and one extra one that demonstrating how it is intended to look to show it does work in most use cases.
I fixed this with some code. To do this I maintain the AccessoryWeld, Enabled=false along with a fake head inside the original head attached at cframe 0,0,0 with a Motor6D. After disabling the AccessoryWeld you can replace it with a motor attached to the fake head. Then I reconstruct the accessory weld cframe by reading the hair attachment.
local function scaletohead(head,handle,headattach)
--local head=character.Head
--local headattach=head.HairAttachment.CFrame
local handleattach=handle.HairAttachment.CFrame
local w=Instance.new("Motor6D")
w.Part0,w.Part1 = handle,head
w.C0 = handleattach--Root2.CFrame:toObjectSpace(Root1.CFrame):inverse()
w.C1= headattach
w.Parent = handle
w.Name=head.Name.."Joint"
-- ResizeScale(Subject,Scale)
end
This solves the above issue since it is only caused by some rigged armatures bones conflicting with the bones of the face. OR whatever is going on with the visual bug.
Hey @Magus_ArtStudios , thank you for your report. I’ve investigated this and it looks like this is a known limitation with the skinning/skeleton system and is due to the BoneInstance in your hierarchy under the handle having a matching name to one of the body part bones (in this case, Head).
In your provided example place, the model that works seems to not have any naming conflicts. I would recommend you go back into your 3d editing tool of choice for your other hair accessories and do the same.
I have fixed this issue for myself by creating a rigged accessory service using tags. All I had to do was replace the AccessoryWeld with a RigidConstraint and configure the attachments as it was.
local function MatchAttachment(attachment,Character)
for i,v in Character:GetChildren() do
local attachment2=v:FindFirstChild(attachment.Name)
if attachment2 then
return attachment2
end
end
return Character.PrimaryPart.RootAttachment
end
for i,v in game.CollectionService:GetTagged("RiggedAccessory") do
while v.Handle:FindFirstChild("AccessoryWeld") do
pcall(function() v.Handle:FindFirstChild("AccessoryWeld"):Destroy()
end)
end
end
local function RiggedAccessory(Accessory)
local handle=Accessory:FindFirstChild("Handle")
task.wait()
if handle then
local attachment=handle:FindFirstChildOfClass("Attachment")
local attachment2=nil
if Accessory.Parent then
local Humanoid=Accessory.Parent:WaitForChild("Humanoid")
if Humanoid then
-- print("Humanoid")
if attachment then
attachment2=MatchAttachment(attachment,Humanoid.Parent)
end
if attachment2 then
-- print("Attachment2")
local AccessoryWeld=handle:WaitForChild("AccessoryWeld")
if AccessoryWeld then
-- print("Accessory Weld")
local RigidConstraint=handle:FindFirstChild("RiggedA") or Instance.new("RigidConstraint")
RigidConstraint.Name="RiggedA"
RigidConstraint.Attachment0=attachment
RigidConstraint.Attachment1=attachment2
RigidConstraint.Parent=handle
--print(RigidConstraint)
for i,v in handle:GetChildren() do
if v.Name=="AccessoryWeld" then
v.Enabled=false
end
end
AccessoryWeld.Enabled=false
end
end
end
end
end
end
game.CollectionService:GetInstanceAddedSignal("RiggedAccessory"):Connect(RiggedAccessory)
Their are additional issues with using accessory welds to bodyparts using rigged accessories. Another issue is it would only render one of these accessories on the character then if another was added it would disappear and be invisible… So this solution I shared solves all those issues. I understand their may be more underlying reasons to the bug I posted about. But in a game you can basically replace AccessoryWelds with RigidConstraints and you can add rigged accessories to your project. Otherwise their are more than just the Graphical Bugs with Dynamic Heads, such as the only rendering one rigged accessory model and making the rest invisible. Rigged Accessories are very important for my project such as replacing legs with animated rigs to become a centaur, mermaid, spider, in addition to animated bunny ears, tails, wings and especially the hair physics.
The solution I made works perfectly for me as it scales along with the attachments and maintains the behavior of the size scaling while also the added RigidConstraint being contained inside the accessory.