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

How can I make the camera face a part?

Hi so I'm creating something where when the player touches something, the camera is supposed to look at the player. The camera part is looking at the player's humanoidrootpart, and the camerasubject is the camera part. When I change it to scriptable, because I dont want the player to be able to move the camera, it doesn't work. The camera stays at the same place, but nothing else works. When I change it to anything else, the camera faces the player, but the player is able to move the camera. How can I fix this? This is the code.

cam.CameraType = Enum.CameraType.Scriptable
CameraPart.CFrame = Player.Character.HumanoidRootPart.CFrame * CFrame.new(10,5,1)
cam.CameraSubject = CameraPart
CameraPart.CFrame = CFrame.new(CameraPart.Position,Player.Character.HumanoidRootPart.Position)

1 answer

✓ Accepted answer

I'm not sure I understand.. Don't you mean to set the

cam.CoordinateFrame

instead of creating and rotating a 'CameraPart' (which is now set as the subject?)

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