Hi, I’m trying to make one of those “shapeshift” abilities. Everything is working in order except for the actual welds of the meshpart. Our morphs are made by invisible body parts with the mesh parts of the morph welded to them, the issue is that the Welding of the cloned meshes from the target that the caster is “shapeshifting” into have an offset of a rather odd manner, please see below.
I’ve calculated an offset from the Target’s Mesh to the Limb, moved the Target’s Mesh to Caster’s Limb’s CFrame and then applied that offset but it seems to appear weird.
If you could help that would mean so much, any help is appreciated, thank you
for _, Target_Clothing:BasePart in pairs(Morph_Template:GetDescendants()) do
local Limb = Target_Clothing:GetAttribute("Limb")
if not Limb then continue end
local Template_Limb:BasePart = Morph_Template:FindFirstChild(Limb)
local Target_Limb :BasePart = Target_Info.Target_Character:FindFirstChild(Limb)
local Caster_Limb :BasePart = Remote_Info.Character:FindFirstChild(Limb)
if not Target_Limb then continue end
if not Caster_Limb then continue end
if not Template_Limb then continue end
task.synchronize()
local Orientation = Target_Clothing.Orientation
local Clothing = Target_Clothing:Clone()
local Old_Transparency = tonumber(Clothing.Transparency)
local Weld = Instance.new("Weld")
local WC = Clothing:FindFirstChildOfClass("WeldConstraint")
if not WC then else
WC:Destroy()
end
Weld.C0 = (Clothing.CFrame - Template_Limb.Position) * CFrame.Angles(Template_Limb.CFrame:ToEulerAnglesXYZ())
Weld.Part0 = Clothing
Weld.Part1 = Caster_Limb
Weld.Parent = Clothing
Clothing.CFrame = Caster_Limb.CFrame
Clothing.Transparency = 1
Clothing.CanCollide = false
Clothing.Anchored = false
Clothing.Parent = Caster_Limb
Janitor[Clothing.Name] = function()
Function_Library.Tween(Clothing, {Transparency = 1}, 0.5)
task.delay(0.5, Clothing.Destroy, Clothing)
end
task.spawn(function() task.wait(0.1)
task.synchronize()
Function_Library.Tween(Clothing, {Transparency = Old_Transparency}, 0.5)
end)
end
The player on the left is the target and what I want the player on the right to look like and have their meshes positioned. If anyone could help me this would be great, thank you !