Scripting HelpersARCHIVE
A little piece of Roblox history. Preserved for everyone, one question at a time.Read about the archive →
✓ ANSWER ACCEPTED

how to make a objects face point towards another object?.

I can make the a part "Red" point towards another part "Green" using the Red parts front face but how do I get the same result but using another face of Red for example the left face.

local Green = workspace:WaitForChild("Green")
local Red = workspace:WaitForChild("Red")
while wait(0.1) do
	Red.CFrame = CFrame.new(Red.Position, Green.Position)
end

1 answer

✓ Accepted answer

Is this what you were looking for:

local Green = workspace:WaitForChild("Green")
local Red = workspace:WaitForChild("Red")

while wait(0.1) do
	Red.CFrame = CFrame.new(Red.Position, Green.Position) * CFrame.Angles(0, math.rad(90), 0)
end

3 comments

0

thank you that helped alot. Although ive heard that CFrame.RightVector can achieve the same results. if so could you show me how to use it?

0

Sorry I'm not familiar with that method.

0

that's alright thank you for your help

This discussion is preserved as it was. New answers, comments, and votes are closed.