LookAt / LookVector Problem!

Hey! hope you’re having a great day!

So today i was working on something, and i wanted to make this model to look at my camera, so i decided to make a basic script including CFrame.LookAt.

local CurrentCamera_2 = workspace.CurrentCamera

local function hahah2()
	workspace.Event.Objects.Countdown.Symbol.CFrame = CFrame.lookAt(workspace.Event.Objects.Countdown.Symbol.Position,CurrentCamera_2.CFrame.Position)
end
game:GetService("RunService").RenderStepped:Connect(hahah2)

Everything was fine until i noticed this, as you can see in this picture the thing is looking at me but not as i want, just saying, this isn’t the first time that this happen to me.

This is how it should look like:

This is a mesh btw, if you can help me, that would be amazing!

(if this is the wrong category please tell me, this is my first topic)

Sorry, your code is hard to read. Can you format it with code blocks, please?

```lua
– code here
```

Like that. Additionally, which side of the object should be facing you? The right side, etc etc?

1 Like

maybe you can change the rotation of the primary part inside the model?

CFrame.Angles uses an angle measurement, while a LookVector is a vector describing what direction a line is traveling

Think of the LookVector as a 3-Dimensional slope

If a line travels 5 studs up for every 2 studs forwards, it has a slope of 5,2 (or more traditionally 5/2 but)

For 3D, if a line looks 4 studs right for every 2 studs up for every 3 studs forwards itd have a lookvector of (4,2,3)

Usually to set a parts direction using a lookvector you can use

CFrame.lookAt(position, position + lookVector)
1 Like

Let’s say that i’m not good at scripting.

I used your method but i don’t know if i wrote the code well.

local function v9()

workspace.Event.Objects.RT_Door["SM_Buffet_Rift_Doorway.mo"].CFrame = CFrame.lookAt(workspace.Event.Objects.RT_Door["SM_Buffet_Rift_Doorway.mo"].Position, CurrentCamera_2.CFrame.Position + Vector3.new(200,200,200))

end

game:GetService("RunService").RenderStepped:Connect(v9)

And this is what happened:

Use the code you put into your original post, but add one thing

CFrame.lookAt(…) * CFrame.Angles(0,math.rad(90),0)

1 Like