Sorry for the confusing title, but I have a question. How would I add onto a Vector3 ? For example, I have block A and I want to move it in front of block B, and then move block B in front of block A, over and over again. How would I “add” onto a Vector3? I’m really sorry if it doesn’t make sense, but if you do understand, I’d appreciate any answers.
You separate the vector into components, and have a function for applying X, Y, and Z. You can already grab your values by refering to them, but to edit, youll have to grab the values every time and create a new vector3 or mathematically alter the original as a whole
Block A.Position = BlockB.Position + Vector3.new(0, 5, 0) -- 5 studs on top of blockb
--alternatively using cframes so that blockA will ALWAYS be in front of blockB no matter the rotation
BlockA.CFrame = BlockB.CFrame * CFrame.new(0, 0, -5) --5 studs in front of blockB no matter what