Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How do I make a tween size a part from one side?

Asked by 4 years ago

I made some beam that's supposed to tween out from one side but it tweens from both sides. This is what happens: https://gyazo.com/f1b4656c69b7e74de778cf328971a8dd

0
Lol u have to provide us the script Auxigin 47 — 4y

1 answer

Log in to vote
0
Answered by
Dfzoz 489 Moderation Voter
4 years ago
Edited 4 years ago

you are only changing the size of the part on the tween. You also need to tween the position to match the new beam size you are tweening. Usually you need to tween the position to half of the size you increased. Example: you increased your beam size by 10 studs, so increase the beampos to the same direction by 5 studs (10/2).

0
Could you give me a code example? I'm pretty new to tweening. FuZioNToxic 7 — 4y
0
Maybe something like this: sizeincrease = 10 tween = tweenservice:create(beam,tweeninfo,{size=size+Vector3.new(0,0, sizeincrease),CFrame=CFrame(0,0,(sizeincrease/2)). Its possible that you are resizing another vector of the part or that the CFrame orientation is wrong, try changing the z value of the cframe (which is sizeincrease/2) to negative or changing it to the x value) Dfzoz 489 — 4y
Ad

Answer this question