I am trying to make a jello block where it stretches where the bottoms and top parts go.
I have tried using the script they showed in the tutorial but it does not seem to work because they only did one part and never made another video explaining:
local RUN = game:Getservice(“Runservice”)
local Top, Bottom = script.parent:WaitForChild(“Top”), script.parent:WaitForChild(“Bottom”)
local Outer, Inner = script.Parent:WaitForChild(“Outer”), script.parent:WaitForChild(“Inner”)
local mass = Outer:Getmass() – height * width * width
–width = (mass / height)*.5
RUN.Stepped:connect(function()
local p1 = Top.CFrameCFrame.new(0,Top.Size.Y.5,0).p
local p2 = Bottom.CFrameCFrame.new(0,Bottom.Size.Y-.5,0).p
local height = (p1-p2).Magnitude
local width = (mass / height)^.5
Outer.Size = Vector3.new(width, height, width)
Inner.Size = Outer.Size + Vector3.new(1,1,1)*-1
Outer.CFrame = Top.CFrame:lerp(Bottom.CFrame,.5)
Inner.CFrame = Outer.CFrame
end)