Beam Tweening doesn't go upward but it's getting smaller, how do i fix this?

The beam doesn’t go upward instead it’s getting smaller when tweening, how do i fix this?
i have been looking for hours for this topics, none of it’s was found… or it’s just me.

Script :
function beamEffect(root)
local beamPrimary = beams.PrimaryPart
local beamRotation = beamPrimary.Orientation

beamPrimary.CFrame = root.CFrame
beamPrimary.CanCollide = false
beamPrimary.Massless = true
beamPrimary.Parent = workspace
beamPrimary.Orientation = beamRotation

local weldRoot = Instance.new("WeldConstraint", beamPrimary.Parent)
weldRoot.Part0 = root
weldRoot.Part1 = beamPrimary

local StartPos = Vector3.new(0,20,0)
local BeamTween = ts:Create(beamPrimary, TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut), {Size = StartPos * 3})
BeamTween:Play()

return beamPrimary

end

I don’t use tweening alot many times, i don’t know if there’s properties for this.

its quite literally getting smaller because you are changing its size, if you want it to go upwards change its cframe instead

local BeamTween = ts:Create(beamPrimary, TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut), {CFrame = beamPrimary.CFrame * CFrame.new(0,10,0)}) --change 10 with how much you want it to go up
BeamTween:Play()

Sorry for the mistake not upward, i mean increasing the beam Y Axis, it’s getting smaller when it’s tweening.

local BeamTween = ts:Create(beamPrimary, TweenInfo.new(1,Enum.EasingStyle.Quad,Enum.EasingDirection.InOut), {Size = beamPrimary.Size + Vector3.new(0,beamPrimary.Size.Y * 3,0)}) 
BeamTween:Play()

try that