How to resize a cylinder from one end and move it backwards in Roblox

I'm making a cigarette in Roblox and I want it to work correctly

it made the cig resize to the front.

you can get it yourself here:

and for people who want the code all you really need to see is this:

for i = bit.Size.X, 0, -0.1 do
    local tweenInfo =
    local goal = {}
    goal.Size =, bit.Size.Y, bit.Size.Z)
    local tween = TweenService:Create(bit, tweenInfo, goal)
    bit.CFrame = bit.CFrame + bit.CFrame.LookVector * -0.1

But seriously, I do recommend downloading the RBXM file and actually testing it.

Also its a tool, so this accounts for rotations.


  • If you're going to use a Tween, don't put it into a for-loop. When two Tweens try to manipulate the same properties, they start to cancel each other out.

    So just put all the resizing logic into one tween and make it take the full length of time :

    local BURN_RATE = 1.0 -- studs/second
    local cigLength = bit.Size.X
    local tweenInfo = * BURN_RATE) -- take more time based on how long the cig is
    local goal = {
        Size =, bit.Size.Y, bit.Size.Z),
        Position = (bit.Position - / 2, 0, 0)),
    local tween = TweenService:Create(bit, tweenInfo, goal)
    -- TODO : if the tool is put away, simply cancel the tween