How to create a custom grid system for the purpose of relative part positions

I am trying to create a pizza making game, where one of the stages involves putting toppings on the pizza. I want the player to drag toppings onto the pizza (kind of like in Papa’s Pizzeria) and then the relative positions of these placed toppings will be saved then later scored.

The problem I am running into is how to go about determining the coordinates of the placed topping. What I initially tried to do was use a SurfaceGui on the pizza then detect where the player clicked on the gui with a rayCast but I can’t get it to work and I’m wondering if there’s a better way to achieve what I’m trying to do.

Ideally what I want is a system where the player selects a topping and upon placement, the coordinates of the part are saved (x and y). I suppose I can do this with Vector3.Position of all the parts involved but that would lead to dealing with lots of long decimals and I’m not sure it would work with my grading process all that well.

The grading process involves comparing the pizza the player made with a premade pizza (the coordinates of each pizza will be compared to see how close the player got to making the “model” pizza).

I am looking for any advice for how I can go about making an array/grid on my pizza to then use to measure the location of placed toppings.

For each axis do:

math.round(PositionOnAxis / Grid) * Grid

That should work!