Hi, I’m trying to work on a mechanic that involves CFrames in my game, but it is not doing what I want it to do. It uses a loop of 3 scripts, one that moves it to the right, then the next SHOULD just move it down, then the next one SHOULD just move it to the original position.
Here are the scripts, in order:
What the scripts are actually doing is:
The first one works normally, only moving it to the right.
The second one moves down and to the left (IT SHOULD ONLY MOVE DOWN) (also the -0 on x doesn’t actually do anything for some reason, unlike the third one where that +0 does do something.)
The third one works normally, moving it to the left and up. (I should mention that the +0 for some reason moves it up 50, to the regular y value. idk why, it’s just really weird.)
I should mention this is my first time working with CFrames but when I look at the code it all checks out, so why is it doing this?
Any help appreciated, thank you everybody!
From a quick skim, I don’t see anything with the code that could be making tween #2 misbehave.
I’d probably guess you’re overlapping one tween with another and it’s trying to do 2 tweens at once?? (I don’t know if the result would be THAT but it’s a random guess.)
Try testing tween #2 individually or make it print stuff like print(part.Position.X) to find out if it’s going to the right spot or not
I did it on all of them after testing just number 2. Drain is #2, and I don’t know why it is moving the x as well. The rest of the script works perfectly as intended.
I figured out a fix, where I just counteract the 2nd script by adding a -239.219 to its x axis and then remove the +239.219 on the x axis for the 3rd script but it is still really confusing and weird…