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

How would I create an orientation from a united LookVector?

I want a part to face the LookVector of a CFrame. I am not allowed to change the position at all, just the orientation. The vector I want to set the orientation of the part to is this:

local CastDirection = CFrame.new(RootPos, Vector3.new(ClickPos.X, RootPos.Y, ClickPos.Z)).LookVector.Unit

How can I make that part face the CastDirection?

1 answer

part.CFrame = CFrame.new(part.Position,CastDirection)

3 comments

0

maybe

0

script.Parent.Touched:Connect(function(hit) Hit = nil end)

0

No but close: part.CFrame = CFrame.new(part.Position,part.Position+CastDirection)

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