Jarod645
|
  |
| Joined: 30 Jun 2008 |
| Total Posts: 56 |
|
|
| 11 May 2014 11:51 AM |
Hello everyone, I've been working on a script for a vehicle of mine, and I need to lock the player into first-person when a button is pressed. I've tried several methods, including CameraMaxZoomDistance and Enum.CameraMode.LockFirstPerson, but nothing seems to be working. I think the problem might be that I'm attaching the camera to a brick, and the properties that would allow me to lock first person aren't working properly because of that. Does anybody know how I can make this work? Sincerely, Jarod645 |
|
|
| Report Abuse |
|
|
Jarod645
|
  |
| Joined: 30 Jun 2008 |
| Total Posts: 56 |
|
| |
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 11 May 2014 12:34 PM |
put this in a localscript
game:GetService('Players').LocalPlayer.CameraMode = Enum.CameraMode.LockFirstPerson
It will only work in a localscript |
|
|
| Report Abuse |
|
|
Jarod645
|
  |
| Joined: 30 Jun 2008 |
| Total Posts: 56 |
|
|
| 11 May 2014 01:20 PM |
| Nope, that didn't work. Any other suggestions? |
|
|
| Report Abuse |
|
|
ColdSmoke
|
  |
| Joined: 02 Jan 2012 |
| Total Posts: 5784 |
|
|
| 11 May 2014 01:21 PM |
| It works great for me, is there an output? did you actually put it in a localscript? |
|
|
| Report Abuse |
|
|
|
| 11 May 2014 01:26 PM |
--local script inside backpack
game.Workspace.CurrentCamera.CameraType = "LockFirstPerson"
--or maybe it was this, try both,
game.Workspace.CurrentCamera.CameraType = "Lock First Person" |
|
|
| Report Abuse |
|
|
Jarod645
|
  |
| Joined: 30 Jun 2008 |
| Total Posts: 56 |
|
|
| 11 May 2014 02:06 PM |
Apologies for the late reply, I've been meeting with someone. The script is given to the player via a GUI given when said player sits on a certain seat. |
|
|
| Report Abuse |
|
|