A simple continuous swinging motion can be created with time or any number that keeps increasing. In this case I used TimeFromStart()
This would rotate an object +/- 30 degrees.
Set object angle to cos(TimeFromStart() *3) * 30
With help from ChatGPT (after several tries)
This creates a tweening like effect with it slowing at each end.
Set object angle to Amplitude * sin(TimeFromStart()*3 ) * exp(-Damping * abs(sin(TimeFromStart()* 3 )))
In my test
Damping = .5
Amplitude = 30
The speed can be adjusted by changing the number the time is multipled by. In this example it’s 3