Hi,
So i have a button that move players camera to a certain point and then when player press it again it will move camera smoothly to player back. Im using tween service and moving cameras CFrame to point and back, but one problem is that player can move so i can’t just copy its current cframe also player can move also i didn’t set camera type to scriptable since i want players be able to rotate it.
Quick example:
Im in first person and pressing for example “H” then using tween Service i move camera to brick.
I press “H” again and i want it to move camera smoothly to my character.
But i can move so i can’t get cameras cframe to move it using tweenservice back to player.
I tryed making something like this:
--Doing it before moved camera to brick
local x, y, z = camera.CFrame:components()
local x1, y1, z1 = Brick.CFrame:components()
local dif = Vector3.new(x,y,z) - Vector3.new(x1,y1,z1)
--I want to move camera to expected position
local newPOS = Brick.Position + dif
local CF = CFrame.new(newPOS.X, newPOS.Y, newPOS.Z)
But this moves camera near Brick while my character far away. Let me know your thoughts