hi iam trying to make part facing to part but its caused error , please help me thanks
heres the code
local Part = workspace.RealPart
local Part2 = workspace.RealPart1
local UpVector = Part.CFrame.UpVector
local Tween = game:GetService("TweenService")
local Table = {}
local NewPart = Instance.new("Part",workspace)
NewPart.Anchored = true
table.insert(Table,NewPart)
NewPart.CFrame = CFrame.fromMatrix(Part.Position,Vector3.new(0,0,0),Vector3.new(0,0,0),NewPart.CFrame.UpVector:Cross(NewPart.CFrame.RightVector).Unit)
warn(NewPart.CFrame:components())
heres the components:
-13.799987792969 0.5 -1.5999755859375 -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind) -nan(ind)