Why are you doing all this?
Maybe for limits tho, ok so, try to o CFrame.new(pos,lookat(mouse.Hit.p))
an than clamp the result to make it fit your needs, hope this helps a bit
you’re setting the weld to the current rotation it’s at + where your mouse is, instead of setting it to just where your mouse is. This would cause the script to rotate on its own, since you’re creating a turret that spins where the mouse is from what the code says.
What you’re doing currently is no different from rotating a block is what i’m saying. this is an example of how you rotate a block with a weld.