I have this script where if you drink a potion you grow a second head. And you look like this.
However, when i let the same script run but with a player having a dynamic head, it looks like this.
As you can see, the fake head for some reason gets stuck on the neck position of the player, with no way to move it. the fake head is stuck to the uppertorso with a weldconstraint and is named ‘fakehead’.
Does anyone know why this happens and how to fix it?
EDIT: I also tried making an animation for the place the dynamic head should be in so im not messing with the neck motor6D, but for some reason the fake head still gets stuck to the real head
The script for this is
local folder = Instance.new('Folder')
folder.Name = 'FakeHeadFolder'
local fakehead = body.Head:Clone()
if fakehead:FindFirstChild('Neck') then
fakehead.Neck:Destroy()
end
for i,v in pairs(fakehead:GetChildren()) do
if not v:IsA('Decal') then
v:Destroy()
end
end
fakehead.Name = 'FakeHead'
fakehead.Material = Enum.Material.SmoothPlastic
local weld = Instance.new('WeldConstraint')
weld.Part0 = body.UpperTorso
weld.Part1 = fakehead
weld.Parent = fakehead
fakehead.Parent = folder
for i,v in pairs(body:GetChildren()) do
if v:IsA('Accessory') and (v.Handle:FindFirstChild('FaceFrontAttachment') or v.Handle:FindFirstChild('HairAttachment') or v.Handle:FindFirstChild('HatAttachment')) then
local clon = v.Handle:Clone()
clon.AccessoryWeld:Destroy()
local weld = Instance.new('WeldConstraint')
weld.Part0 = fakehead
weld.Part1 = clon
weld.Parent = clon
clon.Parent = folder
end
end
body.Head.Neck.C0 = body.Head.Neck.C0 + Vector3.new(1.4,0,0)
folder.Parent = body