How to use math.noise() to create a smoothly shaking GUI object?

I have already tried doing this by assigning the X position of the GUI object to a math.noise().
I used a “for i” loop which would scroll through the x and y values in math.noise() every frame, and assigning the z value to a constant. This wouldn’t work because it doesn’t loop seamlessly (the object would jump to different positions sometimes)

I’m pretty sure the method I’m using is wrong, especially with the fact that I barely know how to use perlin noise.

How do I do this?