Issue with tween service

Hi! I’m currently making a ride using tweenservice… I’m changing the position and orientation of a base that all the parts are welded to.

All of the ride vehicles but one move as intended and the one moving strange can be found in this video attached:

I have no idea what is causing this and any help is appreciated…

thanks!

Could you please post your code so we can better understand the problem and help you out?

Hi! I use this tween script:
image

Are you getting any errors with the following code? If not, try checking if the welds you made are setup correctly. You might also want to check if there are any differences between the other spaceship models and the one having the problem.

In the part partChanges table do you need to change the position? It looks like you are only rotating.

Yeah, I’m getting no errors printed and I’m also using the exact same model etc… and the welds are the same for all

I think I might know what the problem is. When that spaceship turns it might be passing 360 degrees of rotation which would overflow to 0 degrees leading TweenService to possibly rotate to somewhere around 0 degrees but the other direction. That would explain why it’s spinning like so.

If this is the case, I’m not sure how to advise you to fix it. Instead of TweenService have you tried using BodyMovers?

Wouldn’t this rely on physics and be really unreliable?

Well, yes, BodyMovers can be unreliable, but if setup well they can still be useful. I can’t think of a workaround for the TweenService problem (if that’s the issue), so my next best suggestion is BodyMovers.

Before you use BodyMovers you might want to mess around with the tweening of your model and check if the rotation issue is caused by the issue I mentioned. If it is, I’d just try BodyMovers.

EDIT: BodyMovers also allow player to “stick” to them whilst standing on them without having to do extra coding. That would be a plus of using BodyMovers apposed to any sort of position/CFrame changes.

Try lerping, it can smoothly move something to wherever you want! Use thedevking tutorial search up TheDevKing Lerping

1 Like

Ah! Thanks works awesome. 30 chars.

1 Like

No problem! :smiley:

  • 30 Charssssssss*