This is an updated version of an older topic by me if it seems familiar. (all old topics were deleted)
Have you wanted to make things snap to a grid? It's simple
Just use the following code in an object to do so
Now this puts them on a grid of squares width 100, if you wanted to make the squares bigger or smaller, you would change all the 100's to a different width.
For example, changing all 100's to 50 would make the squares half the width and make the grid squares smaller.
This is in the open-source code so you can use this freely without credit if you want.