I am trying to make my own camera in ROBLOX. Here's my problem, I am using an inverse function to make the camera look nice and smooth but it only works on the x axis in the positive side.

Here's an example of the zoom in and the zoom out of my camera:

Camera animation

For now we can think it's working but if I put my player on a different axis like this:

inver function bug

We can see that the inverse animation is only in the x and y axis and now heres the little part of my code:

for x = 1, 15 do
  y = 10
  camera.CFrame = CFrame.new(Vector3.new(y/x, x+5, camera.CFrame.p.z), character.Head.Position)

What can I do to make it work in the z axis too?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.