Unexpected Tweening Results?

So in my game, I have a function that is ran using collectionservice on multiple parts. It get the value for what to tween to by getting the value from inside the part then running it in the function:

-- Moving
local function CreateTween(part) 
	local NewPosition = part.Position + Vector3.new(part.PositionGoal.Value.X,part.PositionGoal.Value.Y,part.PositionGoal.Value.Z)
	local Tweeninfo = TweenInfo.new(1, Enum.EasingStyle.Sine, Enum.EasingDirection.InOut,-1,true,0)
	local TweenPart = TS:Create(part, Tweeninfo, {Position = NewPosition})
	TweenPart:Play()
end
for _,tweened in pairs(CS:GetTagged("Tweened")) do
	coroutine.wrap(CreateTween)(tweened)
end

The part contains a value called “Position Goal”, (A Vector3Value). I use it to add onto how much I want the part to move in a certain direction. The tween works perfectly but one thing, it changes based on how far the character spawns from it. This comes more noticable if you were to spawn far away from it then go back to it. The saw’s become more out of place. An example:

How Its Supposed to be:
https://gyazo.com/e9cf84af3718ca2189d2ae4d9ae7faa3

What Happens if you go far away:
https://gyazo.com/f61c4afa96ace7bf729305593b77fd19

As you see, the saw is out of place from the grey part. (Where Its supposed to be) How would I fix this issue? (The script is ran Client Sided so could that be part of the issue?)

You running the code on the client-side doesn’t give you these sort of issues. Also it should be fine that your running it on the client-side as long as every client has those scripts running for them.

I suggest that you look over your vector3 values. “This comes more noticable if you were to spawn far away from it then go back to it.” are you sure that this is the case and its not time dependent? Anyways you should review the points which lead up to this, your collection service thingy for example.

I’ve stood in the game watching it right next to it and that doesn’t seem to be the issue with time. It could be maybe where I add it? Gonna have to look more into it later.

Fixed it, script was located in wrong spot which caused it to reset causing the part to stay where it was then add onto it whenever the player died.