R15 Morphing Help

Not too long ago, I was passed down a morph script from my friend for a group. After a roblox update, my morphs started to look odd, and now I can’t seem to do anything about it. May I have some support?

The Script

local Players = game:GetService('Players')
local Morphs = game:GetService('ServerStorage'):WaitForChild('Morphs')
local visible = false
local recol = ''
local function MorphUser(User,Team,Class,Morph,name)
	local MorphRoot = Morphs[Team][Class]:WaitForChild(Morph)					
	for _,v in pairs(User.Character:GetChildren()) do
		if v.Name == name then
			v:Destroy()
		end
	end
	local UserMorph = MorphRoot:Clone()
	UserMorph.Parent = User.Character
	UserMorph.Name = name
	if UserMorph:FindFirstChild('Shirt') then
		if User.Character:FindFirstChild('Shirt') then
			User.Character.Shirt:remove()
			UserMorph.Shirt.Parent = User.Character
		end
	end
	if UserMorph:FindFirstChild('Pants') then
		if User.Character:FindFirstChild('Pants') then
			User.Character.Pants:remove()
			UserMorph.Pants.Parent = User.Character
		end
	end
	for _,u in ipairs(UserMorph:GetChildren()) do
		if u.Name ~= 'Shirt' and u.Name ~= 'Pants' then
			--u.Middle.Transparency = 1
			for _,p in ipairs(u:GetChildren()) do
				if p:IsA("BasePart") then
				 	local W = Instance.new("Weld",u.Middle)
					W.Part0 = u.Middle
					W.Part1 = p
					local CJ = CFrame.new(u.Middle.Position)
					local C0 = u.Middle.CFrame:inverse()*CJ
					local C1 = p.CFrame:inverse()*CJ
					W.C0 = C0
					W.C1 = C1
				end
				local Y = Instance.new("Weld",p)
				Y.Part0 = User.Character:FindFirstChild(u.Name)
				Y.Part1 = u.Middle
				Y.C0 = CFrame.new(0, 0, 0)
				p.CanCollide = false
				p.Anchored = false
			end
		end
	end
end
local function Body(depth,height,width,Char)
	for _,v in pairs(Char.Humanoid:GetChildren()) do
		if v.ClassName == 'NumberValue' then
			if v.Name == 'BodyDepthScale' then
				v.Value = depth
			elseif v.Name == 'BodyHeightScale' then
				v.Value = height
			elseif v.Name == 'BodyWidthScale' then					
				v.Value = width
			end
		end
	end
end
local function Finale(Char)
	for i,v in pairs(Char:GetChildren()) do
		if v:IsA('Accessory') or v:IsA('Hat') then
			v:Destroy()
		end
	end
end
local function Finale1(Char)
	for i,v in pairs(Char:GetChildren()) do
		if v.ClassName == 'MeshPart' or v.ClassName == 'Part' then
			v.Transparency = 1
			if v:FindFirstChild('face') then
				v.face:remove()
			end
		end
	end
end
local function Finale2(Char)
	for i,v in pairs(Char:GetChildren()) do
		if v.ClassName == 'MeshPart' or v.ClassName == 'Part' and v.Name ~= 'Head' then
			v.Transparency = 1
		end
	end
end
local function Head(head,Char)
    for _,v in pairs(Char.Humanoid:GetChildren()) do
        if v.ClassName == 'NumberValue' then
            if v.Name == 'HeadScale' then
                v.Value = head
            end
        end
    end
end

ohmy

2 Likes

Can you give us an image of what it should look like and what the specific problem is

It should look something like this
HELP

But roblox seems to be altering the appearance to look like that.

1 Like
local C1 = CFrame.new(0,0,0)*CFrame.Angles(0,0,0)

Change the current C1 line with the inverse function to this and than proceed to mess around with the angles and positioning until it looks good.

It’s working out, but I’m having a difficult time, re positioning, could you give pointers?

help2

[Script applies to all the morphs]

just have a modulescript called “settings” which has all the cframe positioning data. when you want to wear the morph just get the cframe data from the module.

So, is there no way to make it so that EVERYONE won’t have to do that? Since it’s a auto morph script for a group.

Not really. It required customization. Its not very hard, if people wanted to use it as a free model they just have to enter some cframe positions down…
Another approach to this would be to have attachments on your character. when you wanted to wear the morph the script could just place the morph parts on the different attachments.

Alright, but how would one get the Cframe positions? That would help me a bit.