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

How could I improve my script for making the camera face a npc?

I’m trying to make the camera face my npc named A but it won’t work Here is my script

local npc = workspace.A

local camera = workspace.currentcamera

Camera.cameratype = enum.cameratype.scriptable

3 comments

0

Why will it not work any ideas

0

Could someone help

0

You are missing the part where the script make the camera face the npc, all you did is setting 2 variables and changing the property of the camera

1 answer

✓ Accepted answer
local npc = workspace.A
local camera = workspace.CurrentCamera
Camera.CameraType = enum.cameratype.scriptable
Camera.CameraSubject = npc.Humanoid

you forgot the camera subject. and easier way to format things is to use the "code block" font by pressing the lua icon when making Q's and A's

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