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

how do I make part face the same way as another part with CFrame?

Asked by
ym5a 52
2 years ago

https://gyazo.com/f1cd67380b8d7c10bc031eb83bc747fa basically i just want the grey part to face one of the black lines, I already have code to get a random one, but I cant figure out how rotate it to face the same way as the black lines.

0
Also I need a tween-able or lerp-able property ym5a 52 — 2y

1 answer

Log in to vote
1
Answered by 2 years ago

I think this is what your trying to do

game.Workspace.MainPart.CFrame = CFrame.new(game.Workspace.MainPart.Position,game.Workspace.RandomBlackPart.Position)
0
I already figured it out. for the second CFrame.new() param I add MainPart Position and BlackPart LookVector ym5a 52 — 2y
Ad

Answer this question