Rotating with springs doesn't work properly

Hi, I’m trying to make my own spring module for fun. When I finally thought I got it working it decides not to work properly with only rotations(It seems to work on lower starting speeds). If I’m using it with size and position it works fine. Could the formula be the problem or am I hitting something like a gimbal lock?

mass = 1
dampening = 0.025
tension = 0.025
speed =

local displacement = goal - instance.Position -- instance is the part

spring.speed += ((tension/mass) * displacement) - (dampening * speed)

instance.Position += speed

These are both given a starting speed of 5 in the x and z axis and a 50 in the y axis
Sorry for low quality I used the roblox recorder
Spring with rotation(it seems to never stop):

Spring with position:

Try torsion spring:

No documentation on it currently exists yet, but we know it uses a rotational axis.

Thanks for the answer but, this isn’t using constraints this is just using Vector3s and math.