How would I do this?

So, I would like to know how would I make an object teleport a certain distance behind an object. Meaning if something was facing East it would teleport behind it (West side of the object), if it was facing North it would teleport behind it(South side of the object) (East and North are just examples of the direction not what i actually want).

Take one part’s CFrame and multiply it by an offset CFrame

local myPart = workspace.Part

local destinationPart = workspace.Part2

destinationPart.CFrame = myPart.CFrame * CFrame.new(-10,0,0) -- axis might be wrong, too lazy to check lol
2 Likes

Ok, thank you. Now, do you have any Idea how to do that with a model?

You could use :SetPrimaryPartCFrame.

I have never heard of that before could you explain?

1 Like