#funky train movement

1 messages · Page 1 of 1 (latest)

noble heron
#

@weary jewel i think this is it

mTweenInfo = TweenInfo.new(
0.1,
Enum.EasingStyle.Linear,
Enum.EasingDirection.Out,
0,
false,
0
);

#

but the code to move the train is very messy as i didnt make it

#

my mate did

weary jewel
#

Try EasingDirection.InOut

noble heron
weary jewel
shadow condor
#
#

Cheat sheet

shadow condor
#

Almost home

austere lake
#

the tween is already fine, this has something to do with your code

weary jewel
weary jewel
noble heron
weary jewel
noble heron
#

so depends what u class as large

#

i think these are the only two important ones

weary jewel
#

Oh are you using tweens to move it or a constraint?

noble heron
#

Looks like a bit of both

weary jewel
#

and it looks like you... lerp too?

Gosh this is confusing.

Script looks real old too.

austere lake
#

he's moving the train using a translation which i assuming the alignposition with tween

#
function UpdateTrainCFrame(pNewCFrame)
    mTarget.CFrame = pNewCFrame;
    if (mCurrentTween) then
        mCurrentTween:Cancel();
    end
    local goal = {}
    goal.CFrame = mTarget.CFrame;
    --goal.Position = mTarget.Position;
    mCurrentTween = TweenService:Create(mCabin.Translation, mTweenInfo, goal);
    mCurrentTween:Play();

    --mCabin.Translation.BodyPosition.Position = mTarget.Position;
    --mCabin.Translation.BodyGyro.CFrame = mTarget.CFrame;
end
noble heron
#

Something like that

#

Because using physics make it lag

weary jewel
austere lake
#

why are you using physics object to move it though?

noble heron
#

But you can

austere lake
#

the code says you're moving it using physics object

noble heron
austere lake
#

first of all, did you code this?

weary jewel