March 18, 2021, 4:10pm
I am trying to make a script that will constantly update a model (rigged with welds + a primarypart) to constantly look towards another part.
This is what I have gotten so far, and I want the camera to rotate towards the red part.
I have tried numerous other posts answers but couldn’t seem to get it working myself.
Above is an image of my hitbox, in case it helps.
March 18, 2021, 4:12pm
I’m pretty sure
CFrame.lookAt() will help
Which you can find here
March 18, 2021, 4:17pm
Do you have any examples of using this? I am still a bit confused on CFrames as a whole.
local cf = Model:GetPrimaryPartCFrame()
-- this gets the model's CFrame if it has a primary part (required)
-- this sets the cframe to look at the part
CFrame is the
Orientation of a part.
March 18, 2021, 4:26pm
Hi! I understand it a bit more now, and this worked! Thank you so much!