#build not snapping as intended

10 messages · Page 1 of 1 (latest)

shrewd berry
#

im trying to set the position of 1 building to another by using their attachments as the position whilst maintaining the orientation of the main part ```lua
local foundprimarypart = snaptoattachment.Parent.Parent.PrimaryPart
local cframe = foundprimarypart.CFrame * CFrame.new(snaptoattachment.Position)
local orientation = foundprimarypart.Orientation
selectedbuilding:SetPrimaryPartCFrame(cframe)

#

i also got a variable called 'selfsnapattachment' which is the attachment thats supposed to join onto the snaptoattachment

#

not sure how to do it tho

plush garden
#

A or B?

shrewd berry
plush garden
#

but if it's B then it's quite logical, the center off the new grid is exactly in point B (which is normal as it's position is set to the position of point B, now 2 easy ways to solve it is to either move B to position A. Or do some basic math and just say the position is the current one + (or -, directions needs to also be calculated) the total size/2

shrewd berry