Exsius
|
  |
| Joined: 11 Jan 2010 |
| Total Posts: 6340 |
|
|
| 27 Mar 2015 10:32 PM |
Works in solo but not online
local player = game.Players.LocalPlayer local cam = game.Workspace.CurrentCamera local body = player.Character
while true do wait() cam.Focus = CFrame.new(body.Torso.Position) cam.CoordinateFrame = CFrame.new(body.Torso.Position) + Vector3.new(50,50,50) cam.CameraType = Enum.CameraType.Watch cam.FieldOfView = 15 end
|
|
|
| Report Abuse |
|
|
| |
|
Exsius
|
  |
| Joined: 11 Jan 2010 |
| Total Posts: 6340 |
|
| |
|
drew8732
|
  |
| Joined: 01 Apr 2010 |
| Total Posts: 1965 |
|
|
| 28 Mar 2015 12:44 PM |
| Some code breaks online if it's not in a LocalScript, and I think this is one of those cases. It will work as a normal script in Solo because the game is loaded differently then, but in online if you want to use .LocalPlayer, it needs to be inside a LocalScript. |
|
|
| Report Abuse |
|
|
|
| 28 Mar 2015 12:57 PM |
| Whats the output, that's ye hiden treasure to finding thee solution. |
|
|
| Report Abuse |
|
|
Exsius
|
  |
| Joined: 11 Jan 2010 |
| Total Posts: 6340 |
|
|
| 28 Mar 2015 08:30 PM |
19:29:06.439 - Use the new http api: no Loading Cutscene Editor... IsFirstUse = false false UseOldUI = true true 19:29:12.079 - ! Joining game '' place 0 at localhost 19:29:12.080 - Connecting to ############## Cutscene Editor19:29:06.439 - Use the new http api: no Loading Cutscene Editor... IsFirstUse = false false UseOldUI = true true 19:29:12.079 - ! Joining game '' place 0 at localhost 19:29:12.080 - Connecting to ############## Cutscene Editor Loaded 19:29:21.847 - Connection accepted from ############## Loaded 19:29:21.847 - Connection accepted from ############## |
|
|
| Report Abuse |
|
|
Exsius
|
  |
| Joined: 11 Jan 2010 |
| Total Posts: 6340 |
|
|
| 28 Mar 2015 08:33 PM |
OOps
Cutscene Editor Loaded 19:32:23.599 - Players.Player1.Backpack.LocalScript:7: attempt to index local 'body' (a nil value) 19:32:23.599 - Stack Begin 19:32:23.600 - Script 'Players.Player1.Backpack.LocalScript', Line 7 19:32:23.600 - Stack End |
|
|
| Report Abuse |
|
|
Exsius
|
  |
| Joined: 11 Jan 2010 |
| Total Posts: 6340 |
|
| |
|
Exsius
|
  |
| Joined: 11 Jan 2010 |
| Total Posts: 6340 |
|
| |
|
Exine
|
  |
| Joined: 01 Apr 2013 |
| Total Posts: 3783 |
|
|
| 29 Mar 2015 02:14 AM |
| Check the developer console |
|
|
| Report Abuse |
|
|
drew8732
|
  |
| Joined: 01 Apr 2010 |
| Total Posts: 1965 |
|
|
| 02 Apr 2015 05:33 PM |
| Did you try putting your code in a LocalScript? That could be the reason that nothing at all is happening, but whether or not your script is done right is another problem. |
|
|
| Report Abuse |
|
|
|
| 02 Apr 2015 05:43 PM |
attempt to index local 'body' (a nil value)
The problem is that the character of the player hasn't loaded yet, therefore returns nil. repeat wait() until player.Character
or put a wait(1) at the top of the script and it should be fine. |
|
|
| Report Abuse |
|
|