Tween somehow breaking my code

I am working on making the blob character in my game move via tweens. One of the main things the blob does is collect little pellets of food. However, after 56-60 seconds the blob no longer is able to pick up food. I know it is related to the tween because if I cut the tween time down from 20 to 10 seconds, the blob is unable to pick up food after 28-30 seconds.

The tween currently looks like this:

TweenServicePlus:Construct(Blob,TweenInfo.new(20),Position)--game.TweenService:Create(Blob,TweenInfo.new(20),Position)

Those are both methods of tweening I tried, just to make sure it wasn’t just a problem with the tween module I am using. Position is equal to {Position = Vector3.new(PositionX,1.05,PositionZ)}. I know that isn’t a whole lot of information, but if anyone has any ideas or has other code they would like to see please let me know.

1 Like

Print the Position variable every time and see what it outputs when it breaks

And that would be why. I was passing 1.05 for the Y position and I didn’t realize that was the old value and now the parts are higher so as I was moving around the tween was slowly moving me below the parts I needed to touch to collect.

1 Like