How to create a rotatable gun view on a pivot point

hi! I’m currently making an attachment system for my guns, anyone here who has played fps games will know what I’m talking about here, where you open up the attachment/skin customizer and you can rotate the gun on a point to see around it

robloxapp-20210709-1303433.wmv (1.7 MB)

How would I go about making this? (I already have the cam lock and whatnot just not sure how to make the selectable roation thing)

this might help you Roblox: Rotate Part Via Mouse Movement - YouTube