I'm trying to create armor around the player

So I have a skill called UltraShield, it should create a giant armor around the player in the shape of the player, like that:

I tried clone all player parts, increase the size and try make position that, but dont work very well

**The head be a CUBIC for any reason, **
the parts behave very strange when the player walks, can someone help me?

That is the code:

    --//Services
local RunService = game:GetService("RunService")
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local TweenService = game:GetService("TweenService")
local ServerStorage = game:GetService("ServerStorage")
local Players = game:GetService("Players")
--//Modules
local Casting = require(game:GetService("ServerStorage").Modules.CheckCastingSkill)
local CheckSkill = require(ServerStorage.Modules.CheckCanSkill)
local Shield = require(game:GetService("ServerStorage").Modules.Shields)
local LerpAP = require(game:GetService("ReplicatedStorage").Modules.LerpAPI)
local Effects = require(ServerStorage.Modules.Effects)
local Skills = require(script.Parent.Parent.Script.Skills)
local DamageManager = require(ServerStorage.Modules.DamageManager)
local Unstoppable = require(ServerStorage.GoodEffects.Unstoppable)
local Metrics = {
	["LeftFoot"] = Vector3.new(-0.8999999999999915,-5.49,0),
	["LeftHand"] = Vector3.new(-2.7,-1.9,0),
	["LeftLowerArm"] = Vector3.new(-2.7,-0.8,0),
	["LeftLowerLeg"] = Vector3.new(-0.9,-4.3,0),
	["LeftUpperArm"] = Vector3.new(-2.7,0.3,0),
	["LeftUpperLeg"] = Vector3.new(-0.9,-2.9,0),
	["LowerTorso"] = Vector3.new(0,-1.8,0),
	["RightFoot"] = Vector3.new(0.9000000000000057,-5.5,0),
	["RightHand"] = Vector3.new(2.700000000000003,-1.9,0),
	["RightLowerArm"] = Vector3.new(2.700000000000003,-0.8,0),
	["RightLowerLeg"] = Vector3.new(0.9000000000000057,-4.3,0),
	["RightUpperArm"] = Vector3.new(2.700000000000003,0.3,0),
	["RightUpperLeg"] = Vector3.new(0.9000000000000057,-2.9,0),
	["UpperTorso"] = Vector3.new(0,0,0),
	["Head"] = Vector3.new(0,2.3,0)
}

local UltraS = {}

    UltraS.__index = UltraS

    function UltraS.New(player,T,D,slot,Stage,cd)
	   if Stage == 2 then
		  Casting.RemoveCast(player.UserId,0)
	      Skills.Cooldown(player,0,"UltraShield",slot)
	   else     
		  local newUltra = {}
		  setmetatable(newUltra,UltraS)
		  newUltra.Name = "UltraShield"
		  newUltra.Stage = 1
		  newUltra.OldCharacter = Instance.new("Folder",ServerStorage)
		  newUltra.Slot = slot
		  newUltra.Player = player
		  newUltra.OldCharacter.Name = newUltra.Player.Name
		  newUltra.Model = ReplicatedStorage.Skills.Elemental.UltraShield.Meshes.Model:Clone()
		  newUltra.Model.Name = player.Name.." UltraShield"
		  newUltra.Model.Parent = workspace
		  newUltra.Cooldown = cd
		  return newUltra
	   end  
    end

   function UltraS:GetVectorFromCFrame(cf)
	local VectorC = Vector3.new(cf.X,cf.Y,cf.Z)
	return VectorC
  end


   function UltraS:Build()
	 if self.Stage == 2 then
		for i,v in pairs(self.Player.Character:GetChildren()) do
			if v:IsA("MeshPart")then
			   if v.Name~='HumanoidRootPart' then
				   local Clone = v:Clone()	
				   Clone:ClearAllChildren()
				   Clone.Parent = workspace	
				   Clone.Anchored = false	
				   Clone.CanCollide = false
				   Clone.CastShadow = false
				   Clone.Transparency = 0.8
				   Clone.Material = Enum.Material.Neon
				   local Weld = Instance.new("Weld",self.Model)
				   Weld.Part0 = Clone
				   Weld.Part1 = v
				   Clone.Size = Clone.Size * Vector3.new(2.8,2.8,2.8)	
				   Clone.Position = v.Position + Metrics[""..v.Name]										
			   end
			elseif v.Name == "Head" then
				local Clone = v:Clone()	
				   Clone:ClearAllChildren()
				   Clone.Parent = workspace	
				   Clone.Anchored = false	
				   Clone.CanCollide = false
				   Clone.CastShadow = false
				   Clone.Transparency = 0.8
				   Clone.Material = Enum.Material.Neon
				   local Weld = Instance.new("Weld",self.Model)
				   Weld.Part0 = Clone
				   Weld.Part1 = v
				   Clone.Size = Clone.Size * Vector3.new(2.8,2.8,2.8)	
				   Clone.Position = v.Position + Metrics[""..v.Name]
			end
			
		end
		self.Player.Character:WaitForChild("Humanoid").HipHeight = 8
			  
	 elseif self.Stage == 0 then
		
	 end
   end

   --[[
   function UltraS:Build()
	  if self.Stage == 2 then
	  for i,v in pairs(self.Player.Character:GetChildren()) do
		  if v:IsA("MeshPart")then
			if v.Name~='HumanoidRootPart' and v.Name~='Head' then
				if v.Name == "LeftUpperArm" then	
				local Clone = v:Clone()
				Clone.Parent = self.Model
				Clone:ClearAllChildren()
				if v.Name == "LeftHand" or v.Name == "RightHand" or v.Name =="RightFoot" or v.Name == "LeftFoot" then
					print("SERIUS? REALLUW")
					local Trail = self.Model.Trail:Clone()	
					local Att = {Instance.new("Attachment",Clone),Instance.new("Attachment",Clone)}
					Att[2].Position = Vector3.new(0,2.8,0)
					Trail.Parent = self.Model
					Trail.Attachment0 = Att[1]
					Trail.Attachment1 = Att[2]
				end
			    Clone.Transparency = 0.9	 
				Clone.Size = Vector3.new(2.8, 3.272, 2.8)
			    Clone.BrickColor = BrickColor.new("White")	
			    Clone.Anchored = false	
				Clone.CastShadow = false
				Clone.CanCollide = false
				Clone.Material = Enum.Material.Neon
				local Weld = Instance.new("Weld",self.Model)
				Weld.Part0 = Clone
				Weld.Part1 = v
				Clone.Position = Clone.Position + Vector3.new(10,10,10)			
				end		
			end
		  end	
		  end
	 elseif self.Stage == 0 then
		for i,v in pairs(self.Model:GetChildren()) do
			if v:IsA("MeshPart") then
				coroutine.wrap(function()
					local Actual = v.Size
					for i = 0, 1, 1/30 do
						v.Transparency = LerpAP.Lerp(v.Transparency,0.8,i)
						v.Size = LerpAP.Lerp(v.Size,Actual - Vector3.new(9.5,9.5,9.5),i)
						--v.CFrame = CFrame.new(LerpAP.Lerp(self:GetVectorFromCFrame(v.CFrame),self.Player.Character:WaitForChild(""..v.Name).Position,i))
						RunService.Heartbeat:Wait()
					end
					
				end)()
			end
		end
	 end	
   end
--]]
   function UltraS:CreateEffects()
	 if self.Stage == 1 then
		self.Stage = 2
		coroutine.wrap(function()
		for i = 0, 1, 1/30 do
			self.Player.Character:WaitForChild("HumanoidRootPart").CFrame = CFrame.new(LerpAP.Lerp(self:GetVectorFromCFrame(self.Player.Character:WaitForChild("HumanoidRootPart").CFrame),Vector3.new(self.Player.Character:WaitForChild("HumanoidRootPart").CFrame.X,self.Player.Character:WaitForChild("HumanoidRootPart").CFrame.Y + 8, self.Player.Character:WaitForChild("HumanoidRootPart").CFrame.Z),i)) 
			RunService.Heartbeat:Wait()
		end
		end)()
		self:Build()
	 elseif self.Stage == 2 then
		self.Stage = 0
		--self:Build()
	end
   end

   function UltraS:CanFire()
	 if self.Stage == 1 then
		self:CreateEffects()
	 elseif self.Stage == 2 then
		self:CreateEffects()
	 end
   end

return UltraS

If you notice in your example the larger character is animated, and the smaller character within it is not animated. To me, this means that whoever scripted that has done something like this:

  1. Increased the character size using the Humanoid.BodyWidthScale/BodyDepthScale/BodyHeightScale ValueObjects
  2. Gathered the body objects and accoutrements (e.g. hats), welded them together using their current CFrame relative to the object space of the HRP
  3. Welded the model from step (2) to the C0 of the Torso of the larger character

Edit: I see, both are your examples.

What do you mean by ‘acting strange’ when the player walks? In regard to the Head, you need to clone the special mesh within the head. Ensure that each object you’re cloning are archivable

Problem i need have the small character inside and the large character as the armor

The big character i just Clone the player character, inscreased the size, changed the position and weld with the small character

Ah I see, that’s your issue. You can’t just increase the size and alter the positions and weld it back to the respective object without accounting for the offset in the motors - otherwise your animations will cause the behaviour you have seen above. Check out this and apply it to your code: How Should I Resize Individual Limbs on R15? - #10 by Q_Q

Lol, iam cleaning ALL childs, is that a problem? And why i cant Copy correctly the head?

    for i,v in pairs(self.Player.Character:GetChildren()) do
			if v:IsA("MeshPart")then
			   if v.Name~='HumanoidRootPart' then
				   local Clone = v:Clone()	
				   Clone:ClearAllChildren()
				   Clone.Parent = workspace	
				   Clone.Anchored = false	
				   Clone.CanCollide = false
				   Clone.CastShadow = false
				   Clone.Transparency = 0.8
				   Clone.Material = Enum.Material.Neon
				   local Weld = Instance.new("Weld",self.Model)
				   Weld.Part0 = Clone
				   Weld.Part1 = v
				   Clone.Size = Clone.Size * Vector3.new(2.8,2.8,2.8)	
				   Clone.Position = v.Position + Metrics[""..v.Name]										
			   end
			elseif v.Name == "Head" then
				local Clone = v:Clone()	
				   Clone:ClearAllChildren()
				   Clone.Parent = workspace	
				   Clone.Anchored = false	
				   Clone.CanCollide = false
				   Clone.CastShadow = false
				   Clone.Transparency = 0.8
				   Clone.Material = Enum.Material.Neon
				   local Weld = Instance.new("Weld",self.Model)
				   Weld.Part0 = Clone
				   Weld.Part1 = v
				   Clone.Size = Clone.Size * Vector3.new(2.8,2.8,2.8)	
				   Clone.Position = v.Position + Metrics[""..v.Name]
			end

Don’t clear the children, you need the SpecialMesh within the Head object to get its normal shape. You would need to clear some children though, e.g. the face texture (unless you want it).

I cant delete the humanoid? Sinse already have the small character humanoid (that IS the player)

Yes, delete the humanoid - the issue is that you’re deleting the SpecialMesh object within the Head part - hence why it ends up shaped as a block

Thanks, you are awsome, also did you see the my Metrics table.

    local Metrics = {
	["LeftFoot"] = Vector3.new(-0.8999999999999915,-5.49,0),
	["LeftHand"] = Vector3.new(-2.7,-1.9,0),
	["LeftLowerArm"] = Vector3.new(-2.7,-0.8,0),
	["LeftLowerLeg"] = Vector3.new(-0.9,-4.3,0),
	["LeftUpperArm"] = Vector3.new(-2.7,0.3,0),
	["LeftUpperLeg"] = Vector3.new(-0.9,-2.9,0),
	["LowerTorso"] = Vector3.new(0,-1.8,0),
	["RightFoot"] = Vector3.new(0.9000000000000057,-5.5,0),
	["RightHand"] = Vector3.new(2.700000000000003,-1.9,0),
	["RightLowerArm"] = Vector3.new(2.700000000000003,-0.8,0),
	["RightLowerLeg"] = Vector3.new(0.9000000000000057,-4.3,0),
	["RightUpperArm"] = Vector3.new(2.700000000000003,0.3,0),
	["RightUpperLeg"] = Vector3.new(0.9000000000000057,-2.9,0),
	["UpperTorso"] = Vector3.new(0,0,0),
	["Head"] = Vector3.new(0,2.3,0)
}

there is no mathematical formula in common in Position when I increase the size of the Part, so I had to do the calculation of where all parts should move, i got the small part position subtract from the position of the big one (I made a pre-model to know the positions), and saved the difference

I did, yes, I can see you put a lot of effort into it! To save time next time, have a look at BodyScaling in the Humanoid - you may not have had to do that :slight_smile:

I tryed, but when i delete the humanoid the parts return to original size

That should happen? When i delete the humanoid the parts back to normal size?