crossbar
(crossbar)
#1
Hello everyone, so I have this line of code that moves an object in the workspace for me:
object:SetPrimaryPartCFrame((CFrame.new(mouse.Hit.X, 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!
Dede_4242
(Dede_4242)
#2
Do:
object:SetPrimaryPartCFrame((CFrame.new(math.round(mouse.Hit.X), math.round(mouse.Hit.Y), math.round(mouse.Hit.Z))
It’ll round it to the nearest stud
system
(system)
Closed
#4
This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.