I have a custom model for a head and want to replace the players head with this head. I tried weld contraints but it didn’t work. They were all welded to a cube in the middle of the head of the model, then I welded that to the head, but it didn’t work.
Script That I tried to use:
local touched = false
script.Parent.Touched:Connect(function(hit)
if hit.Parent:FindFirstChild('Humanoid') and touched == false then
touched = true
local clone = game.ReplicatedStorage.Characters.JawTItan.JawTitan:Clone()
clone.Parent = hit.Parent
local weldcontraint = Instance.new('WeldConstraint', hit.Parent.Head)
weldcontraint.Part0 = weldcontraint.Parent
weldcontraint.Part1 = clone.PrimaryPart
clone.PrimaryPart.Position = hit.Parent.Head.Position
end
end)
the hrp cube is supposed to be positioned in the players head.
Just connect all of the parts within the model using welds to the main part and then create a motor6D within the main part that is linked with the head