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

how do i change a bricks LookVector?

Asked by 7 years ago
Edited 7 years ago

i want to do this but it wont work

TargetPoint = game.Players.LocalPlayer.Character.Humanoid.TargetPoint
Part.CFrame.lookVector  = (Part.Position, TargetPoint)
Part.Velocity = Part.CFrame.lookVector*100
0
how is it done in rocket launchers SLENDERMANCLONE -27 — 7y
0
bump SLENDERMANCLONE -27 — 7y

1 answer

Log in to vote
1
Answered by 7 years ago

You'll want to construct a new CFrame (since the lookVector of an existing CFrame is read-only) using the constructor CFrame.new(Vector3 position, Vector3 lookVector). Using this, you can now set the lookVector.

Part.CFrame = CFrame.new(Part.Position, TargetPoint)
0
that didnt work SLENDERMANCLONE -27 — 7y
Ad

Answer this question