Hello!

IS there any spring module that works with **Vector3** and **CFrame** ?

There’s a spring constraint which Roblox provides. The attachments can be positioned with Vector3.

… you know that’s a lua module… and roblox runs on a modified version of lua…? that should work.

that works only for vector3 or numbers, not for cframes

Then you would have to implement orientation into the mix.

I believe Roblox springs are good enough, and you can always rotate the `Attachment`

s to rotate the springs.

As of now I don’t think there is something like this that you are looking for.

A CFrame is a constructor made out of vector3 values. If you really need, you can get relative position using CFrame.Position. It should work for you with positions anyway.

Alright, so I went and did some research and simply you can and cannot. While you cannot spring CFrames you can spring their Position and Angles. Simply create a function that will linearize the CFrame like this;

```
local function getPositionAndAnglesFromCFrame(cf)
return cf.Position, Vector3.new(cf:ToEulerAnglesXYZ())
end
```

Assign these to variables like so;

```
local camera_part_position, camera_part_angles = getPositionAndAnglesFromCFrame(camera_part.CFrame)
```

Now, this function will return two things one being the CFrame’s position and two being the CFrames angles. These two variables are both vector3’s. Now simply have two springs and plug these two vector3’s into the springs like this;

```
spring_pos.Target = camera_part_position
spring_rot.Target = camera_part_angles
```

now finally combine them into one and BOOM;

```
camera.CFrame = CFrame.new(spring_pos.Position) * CFrame.Angles(spring_rot.Position.X, spring_rot.Position.Y, spring_rot.Position.Z)
```

Notice I did `spring_rot.Position.X`

this is because since its a `Vector3`

it has X,Y,Z variables in it, and `CFrame.Angles`

won’t take a vector3, but we can just grab the linear X,Y,Z values out of said vector 3 and `CFrame.Angles`

will take it just fine. If this helped please mark solution.(Also I just realised you posted this a year ago so I hope this still finds you and helps.)

You could turn the Vector3 to CFrame like this

```
CFrame.new(spring data here)
```