Hi,
So for example i have two parts:
Part_2 is bigger and Part_1 smaller.
Part_2 has same CFrame as camera.
How can i move Part_2 so camera will be in the Part_1 CFrame?
Note: I can’t move camera
Umm what i mean is Part_2 inside camera and when i press “B” i will move Part_2 at the Right for example and Part_1 will be in the position Part_2 was before moved. Part_1 and Part_2 welded so i just need to move part_2 but i don’t know how can i move it into right position.
1 Like
Do you mean something like this?
local function swapCFrames(partA, partB)
partA.CFrame, partB.CFrame = partB.CFrame, partA.CFrame
end
game:GetService("UserInputService").InputBegan:Connect(function(input)
if (input.KeyCode == Enum.KeyCode.B) then
swapCFrames(Part_1, Part_2)
end
end)
umm no…
Green: Camera
Blue: Part_1
Brown: Part_2
When i press “B” i want to move Part_2 so Part_1 will be in the same position Part_2 was.
Something like this:
https://gyazo.com/b41b3dbb45d12dda8c1a5f1fa09ea4ae
and when i press “B” again it will move them back. I can make it myself but firstly i need to figure out how to move part_2 so part_1 will be on part_2 old position