Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 20 Sep 2014 12:55 PM |
local Target = game.Workspace.Part local Camera = game.Workspace.CurrentCamera Camera.CameraType = Enum.CameraType.Scriptable Camera.CameraSubject = Target |
|
|
| Report Abuse |
|
|
SirNoobly
|
  |
| Joined: 01 Oct 2009 |
| Total Posts: 253 |
|
| |
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
| |
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 21 Sep 2014 09:24 AM |
| do you know where it is breaking? |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 21 Sep 2014 09:25 AM |
no, I am not getting output
|
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 21 Sep 2014 09:25 AM |
| I recommend putting prints between the lines to find out where it stops. |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 21 Sep 2014 09:27 AM |
Added a print after line 3, didn't print
so the problem is there, right? |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 21 Sep 2014 09:29 AM |
| if it stops printing, then the line afterwards is probably the issue. |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 21 Sep 2014 09:31 AM |
| so what's wrong with line 4? |
|
|
| Report Abuse |
|
|
Nyxis
|
  |
| Joined: 15 Nov 2012 |
| Total Posts: 3374 |
|
|
| 21 Sep 2014 09:34 AM |
| does it make the cameratype scriptable? |
|
|
| Report Abuse |
|
|
Kodran
|
  |
| Joined: 15 Aug 2013 |
| Total Posts: 5330 |
|
|
| 21 Sep 2014 09:35 AM |
| Is the script in startergui or starterpack? |
|
|
| Report Abuse |
|
|
|
| 21 Sep 2014 09:36 AM |
Debug like you've never debugged before.
local Target = game.Workspace:FindFirstChild("Part") if Target then local Camera = game.Workspace:FindFirstChild("CurrentCamera") if Camera then print("Camera AND Target") Camera.CameraType = Enum.CameraType.Scriptable Camera.CameraSubject = Target else print("No camera!") end else print("No target!") end |
|
|
| Report Abuse |
|
|
flump
|
  |
| Joined: 30 Jul 2008 |
| Total Posts: 1039 |
|
|
| 21 Sep 2014 10:01 AM |
| You're setting the camera to scriptable. This makes CameraSubject useless and requires the camera to be positioned by the script manually through coordinateFrame. If you want the camera to follow the part set the CameraType to Custom |
|
|
| Report Abuse |
|
|
Tripane
|
  |
| Joined: 03 Jun 2011 |
| Total Posts: 11432 |
|
|
| 21 Sep 2014 10:35 AM |
Camera.CameraType = Enum.CameraType.Custom Camera.CameraSubject = game.Workspace.Part
CameraSubject never changes to part. |
|
|
| Report Abuse |
|
|