Baby fake torso not welding to real torso?
Hi.
I'm trying to copy off an old baby morph script (don't judge me). I did it, but for some reason, the fake torso is not welding to the real torso (I think).
Can someone please tell me what I missed?
My script:
01 | storage = game:GetService( "ReplicatedStorage" ) |
03 | storage.Events.PlayerToBaby.OnServerEvent:connect( function (player) |
04 | print ( "Request received." ) |
05 | local char = player.Character |
07 | local mesh = char.Head:FindFirstChild( "Mesh" ) |
09 | mesh.Scale = Vector 3. new( 1 , 1 , 1 ) |
12 | local torso = char.Torso |
13 | torso.Transparency = 1 |
14 | torso.CanCollide = false |
16 | local fakeTorso = char:FindFirstChild( "FakeTorso" ) |
21 | local body = Instance.new( "Part" , char) |
22 | body.BrickColor = BrickColor.new( 1 ) |
23 | body.Position = torso.Position |
24 | body.Name = "FakeTorso" |
25 | body.FormFactor = Enum.FormFactor.Symmetric |
26 | body.Size = Vector 3. new( 1 , 1 , 1 ) |
28 | local weld 1 = Instance.new( "Weld" , torso) |
29 | weld 1. Part 0 = weld 1. Parent |
30 | weld 1. Part 1 = char.Head |
31 | weld 1. C 1 = CFrame.new( 0 , 0.25 , 0 ) |
32 | local weld 2 = Instance.new( "Weld" , torso) |
33 | weld 2. Part 0 = weld 1. Parent |
34 | weld 2. Part 1 = char.Head |
35 | weld 2. C 1 = CFrame.new( 0 , - 0.8 , 0 ) |
37 | local bodyMesh = Instance.new( "SpecialMesh" , body) |
38 | bodyMesh.Scale = Vector 3. new( 1.2 , 1.5 , 1.2 ) |
40 | for _, each in ipairs (char:GetChildren()) do |
41 | if each:IsA( "BasePart" ) and each.Size = = Vector 3. new( 1 , 2 , 1 ) then |
42 | if each.Name = = "Right Leg" then |
44 | elseif each.Name = = "Left Leg" then |
52 | print (player.Name.. " has been successfully babified." ) |
Old baby script:
03 | function onTouched(hit) |
04 | if hit.Parent ~ = nil then |
05 | if (hit.Parent:findFirstChild( "Humanoid" ) = = nil ) then return end |
06 | if (hit.Parent:findFirstChild( "IsaMorph" ) ~ = nil ) then return end |
07 | local human = hit.Parent:findFirstChild( "Humanoid" ) |
08 | local player = game.Players:GetPlayerFromCharacter(hit.Parent) |
09 | local char = human.Parent |
10 | if (human ~ = nil ) and debounce = = false then |
12 | if char:findFirstChild( "Infant" ) = = nil then |
13 | local mesh = char.Head:findFirstChild( "Mesh" ) |
14 | mesh.Scale = Vector 3. new( 1 , 1 , 1 ) |
15 | local torso = char.Torso |
16 | torso.Transparency = 1 |
17 | torso.CanCollide = false |
18 | if char:findFirstChild( "FakeTorso" ) ~ = nil then |
19 | char:findFirstChild( "FakeTorso" ):remove() |
21 | local body = Instance.new( "Part" ) |
22 | body.BrickColor = BrickColor.new( 1 ) |
24 | body.Position = torso.Position |
25 | body.Name = "FakeTorso" |
26 | body.formFactor = "Symmetric" |
27 | body.Size = Vector 3. new( 1 , 1 , 1 ) |
29 | local w 1 = Instance.new( "Weld" ) |
33 | w 1. C 1 = CFrame.new( 0 , 0.25 , 0 ) |
34 | local w 2 = Instance.new( "Weld" ) |
38 | w 2. C 1 = CFrame.new( 0 , - 0.8 , 0 ) |
39 | local bodymesh = Instance.new( "SpecialMesh" ) |
40 | bodymesh.Scale = Vector 3. new( 1.2 , 1.5 , 1.2 ) |
41 | bodymesh.Parent = body |
42 | local rightleg = char:findFirstChild( "Right Leg" ) |
43 | if rightleg~ = nil then |
46 | local leftleg = char:findFirstChild( "Left Leg" ) |
47 | if leftleg ~ = nil then |
50 | local marker = Instance.new( "StringValue" ) |
52 | marker.Name = "IsaMorph" |
53 | characterparts = char:getChildren() |
54 | for i = 1 ,#characterparts do |
55 | if characterparts [ i ] .className = = "Part" then |
56 | characterparts [ i ] .Locked = false |
58 | if characterparts [ i ] .className = = "Hat" then |
59 | characterparts [ i ] .Handle.Locked = false |
66 | print ( "scriptcomplete" ) |
69 | script.Parent.Touched:connect(onTouched) |