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

Custom Camera Script is Not Working, Argument 3 Missing?

Asked by 7 years ago

I followed the wiki on how to create a custom camera script and it seems it isnt working. I was wondering if anyone here could help me out a little.

Here is the code

01local cameraHeight = 12
02local cameraZOffset = 20
03local cameraXChase = 10
04local cameraSpeed = .25
05 
06local camera = game.Workspace.CurrentCamera
07local player = game.Players.LocalPlayer
08local RunService = game:GetService('RunService')
09 
10local function setupCamera()
11    camera.CFrame = CFrame.new(Vector3.new(0,cameraHeight,cameraZOffset), Vector3.new(0,cameraHeight,0))
12end
13 
14setupCamera()
15player.CharacterAdded:connect(setupCamera)
View all 28 lines...

Its a LocalScript under StarterPlayer.StaterPlayerScripts. And its like its not finding the torso.

The output says at line 28 (The last line after end) It says Argument 3 missing or nil? I have never had this before?

1 answer

Log in to vote
1
Answered by 7 years ago
1RunService:BindToRenderStep('Camera', Enum.RenderPriority.Camera.Value, onUpdate)
Ad

Answer this question