How do I move an object by 1 stud?

Hello everyone, so I have this line of code that moves an object in the workspace for me:

object:SetPrimaryPartCFrame((, mouse.Hit.Y, mouse.Hit.Z)

And it works fine, but it moves the object with a 0 stud difference. I want it to move for every 1 stud. Does anyone know how to achieve this? Thanks!


object:SetPrimaryPartCFrame((, math.round(mouse.Hit.Y), math.round(mouse.Hit.Z))

It’ll round it to the nearest stud

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.