NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 30 Apr 2014 02:13 PM |
if game.Players.LocalPlayer.CameraMode == "LockFirstPerson" then
|
|
|
| Report Abuse |
|
|
noah
|
  |
| Joined: 11 Sep 2006 |
| Total Posts: 18977 |
|
|
| 30 Apr 2014 02:13 PM |
| You need 2 equal signs in 'if statements'. |
|
|
| Report Abuse |
|
|
|
| 30 Apr 2014 02:18 PM |
p = game.Players.LocalPlayer FirstPerson = Enum.CameraMode.LockFirstPerson Classic = Enum.CameraMode.Classic
script.Parent.Touched:connect(function(hit) if p.CameraMode == FirstPerson then p.CameraMode = Classic else p.CameraMode = FirstPerson end end)
idk why are you using this you should add a if to check if the part he touched is correct script like this will only make camera mode change awerytime player touches anything(if this is a local script inside player torso etc.) |
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
| |
|
|
| 30 Apr 2014 02:58 PM |
p = game.Players.LocalPlayer
script.Parent.Touched:connect(function(hit) if p.CameraMode == "LockFirstPerson" then p.CameraMode = Enum.CameraMode.Classic else p.CameraMode = Enum.CameraMode.LockFirstPerson end end)
|
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 30 Apr 2014 03:27 PM |
| p = Workspace.CurrentCamera |
|
|
| Report Abuse |
|
|
NeonRiver
|
  |
| Joined: 12 Feb 2013 |
| Total Posts: 4936 |
|
| |
|
vlekje513
|
  |
| Joined: 28 Dec 2010 |
| Total Posts: 9057 |
|
|
| 30 Apr 2014 05:29 PM |
script.Parent.Touched:connect(function(hit) p = game.Players:GetPlayerFromCharacter(hit.Parent) if p then if p.CameraMode == "LockFirstPerson" then p.CameraMode = Enum.CameraMode.Classic else p.CameraMode = Enum.CameraMode.LockFirstPerson end end end) |
|
|
| Report Abuse |
|
|
128GB
|
  |
| Joined: 17 Apr 2014 |
| Total Posts: 8056 |
|
|
| 30 Apr 2014 09:41 PM |
| The camera is not inside the player. |
|
|
| Report Abuse |
|
|