I’m making a dialouge system that shows the head of the player with an animation and talking face.
everything seems to work fine except the fact the hats wont attach correctly and when they do they’re stuck and dont move with the head. Need help!
I’m using a WorldModel for the viewport.
code:
function UpdateCharacter3(character)
for i, v in pairs(script.Parent.PlayerImage.Icon.WorldModel:GetDescendants()) do
if v:IsA("Accessory") or v:IsA("Hat") or v:IsA("BodyColors") then
v:Destroy()
end
end
for i, v in pairs(character:GetChildren()) do
if v:IsA("Accessory") or v:IsA("Hat") or v:IsA("BodyColors") then
local new = v:Clone()
new.Parent = script.Parent.PlayerImage.Icon.WorldModel
end
end
wait()
script.Parent.PlayerImage.Icon.CurrentCamera = camera
camera.CFrame = script.Parent.PlayerImage.Icon.WorldModel.Head.CFrame * CFrame.new(0, 0.2, -2) * CFrame.Angles(0, math.rad(180), 0)
end
How it looks : https://gyazo.com/6c943bb410fe2f40383deac6872ee641