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

Animations, loops and welds. How exactly?

Asked by 4 years ago

So I'm in a bit of a pickle right now. Let me explain the situation.

I have a vehicle with sliding doors. Nothing special, I'd just use tween to open them, right? Well, apparently using CFrame to move a welded object causes all other parts to move to.

So, I can't use Tween, right?

Ok. Moving it with position seems ok, since other parts stay in place. The problem is due to the way lua works every time I lerp position with for loop the script I call it from pauses until the loop is finished. So modules, bindables and shares won't work either.

I'm not an experienced coder or roblox developer. Is there any way out of this?

Thanks

0
You can try to wrap the position lerp in spawn(function() ... end) (where ... is your position lerp) Arctanh 1 — 4y
0
Alternatively, my dumb self just discovered position property of Tween service ItsNimbusCloud 66 — 4y
0
Although threading solution is good as well. Thanks ItsNimbusCloud 66 — 4y
0
You shouldn't be using a tween at all for this, you should be moving the whole door assembly with a prismatic constraint. EmilyBendsSpace 1025 — 4y

Answer this question