Hey,
So I’m trying to create a drawing canvas using a SurfaceGui. I’ve made the whole system and it works fine except when I use the drawing function for recursion, aka calling itself. Any point that I place without calling the function from itself seems to be placed correctly, however you’re supposed to draw while still holding your mouse so I used the recursion method. Now, when that happens, I don’t know why but my point gets placed on the top left corner of my canvas. How could I fix this issue?
I used the GetMouse().X
and GetMouse().Y
to get the player’s mouse position and placed the point using UDim2.new(0, mouse.X, 0, mouse.Y)
which seems to be working fine for the first point as I mentioned.