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

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

Asked by 5 years ago

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

0
Why will it not work any ideas Eyelesstiamat 7 — 5y
0
Could someone help Eyelesstiamat 7 — 5y
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 Azure_Kite 885 — 5y

1 answer

Log in to vote
0
Answered by 5 years ago
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

Ad

Answer this question