I’m making a game that uses tweens to path objects between waypoints.
There is a very strange bug that occurs if I don’t have obnoxious amounts of waits set around in my script:
Every now and again, when interupting an existing tween, when trying to set a new one the part’s position will go to some extreme negative number under the map.
Someone reported a bug similar to this a while back: TweenService position overflow
But if you take a look at the thread there is zero useful information. I guess bugs/ solutions to bugs are just private info?
I’d like to know what it is that might be causing this issue specifically, because it’s been bothering me for a while.
The waypoints seem to be going to the correct spots, and the tween end position seems to be good.
It seems to be when I start a tween, the position might just set its Y coordinate to -100,000 or something all of a sudden.
Specifically, if I try to set the parts position with a reference to the part’s current position itself, it seems like if the object is mid-tween it returns some kind of “can’t deal with it” number.
ai.CFrame = CFrame.new(ai.Position, Vector3.new(newWayPoint.X, ai.Position.Y, newWayPoint.Z))