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?)