How do I tween cframe values to a position

Hey, I am trying to tween an part position but I am using cframes, how do I do this?

Clearly, below I can’t do because different values.

if LaserPart.Position == Vector3.new(0, 0, 0) then
		LaserPart.CFrame = CFrame.new(origin, rayTarget - rTarget.Humanoid.MoveDirection * 2) * CFrame.new(0,0, -distance / 2)
	else
		
		local goal = {}
		goal.Position = CFrame.new(origin, rayTarget - rTarget.Humanoid.MoveDirection * 2) * CFrame.new(0,0, -distance / 2)
		local tweenInfo = TweenInfo.new(0.1)
		
		local tween = TweenService:Create(LaserPart, tweenInfo, goal)
		
		tween:Play()
	end
	

Depending on what you want to do you can either

  1. just change goal.Position to goal.CFrame which would tween the rotation too
  2. keep it as goal.Position but wrap all of the cframe stuff in ( ).Position, so like (CFrame.new(blah,blahblah)*blahblahblah).Position, this would keep the original rotation and change the position
1 Like

Thanks, number 2 will be what I need, don’t want to rotate, but clearly I did something wrong lol https://gyazo.com/fba7ef96b6e9fea3454a911e5577cf5d

Now instead of doing distance/2 I think you need to do part.Size.Z/2 since it’s not the full length from start to finish anymore
As for resetting the part, I would just create a new part for each projectile instead of reusing the same one, it’s less efficient but is much easier to work with, especially with tweens that go a set amount of time which need proper timing and stuff

It tracks the user not shoots so do I need a new one?

So you want it to be a constant beam but you tween it so that it’s slightly behind the person?
If so that makes much more sense thinking back on your post yesterday

Yes, that is what I want and if they stop moving it will catch up to them