Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
1

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

Asked by 3 years ago

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

Log in to vote
1
Answered by 3 years ago

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
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? xXmacerofXx 29 — 3y
0
Sorry I'm not familiar with that method. wurldburd 86 — 3y
0
that's alright thank you for your help xXmacerofXx 29 — 3y
Ad

Answer this question