ScriptOn
|
  |
| Joined: 22 Aug 2010 |
| Total Posts: 10885 |
|
|
| 26 Dec 2013 07:04 PM |
I need to put the camera back on the player like it used to be. This is what I've done with it:
local target = workspace.CameraPart local camera = workspace.CurrentCamera camera.CameraType = "Scriptable" camera.CameraSubject = target local angle = 0
while move == true do wait() camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part * CFrame.Angles(math.rad(0), math.rad(90-angle), math.rad(45)) --Rotate by the angle * CFrame.new(45, 0, 25) --Move the camera backwards 5 units angle = angle+1 end
This works fine, but when I disable it the camera doesnt go back to the player correctly. |
|
|
| Report Abuse |
|
|
|
| 26 Dec 2013 07:06 PM |
you can remove the current camera, then it should be reset
|
|
|
| Report Abuse |
|
|
kubuto2
|
  |
| Joined: 16 Jul 2008 |
| Total Posts: 1275 |
|
|
| 26 Dec 2013 07:08 PM |
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
http://wiki.roblox.com/index.php/CameraSubject_(Property) |
|
|
| Report Abuse |
|
|
lolb3
|
  |
| Joined: 16 Jan 2010 |
| Total Posts: 2268 |
|
|
| 26 Dec 2013 07:22 PM |
Workspace.CurrentCamera.CameraType = "Custom" Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoud |
|
|
| Report Abuse |
|
|
ScriptOn
|
  |
| Joined: 22 Aug 2010 |
| Total Posts: 10885 |
|
|
| 26 Dec 2013 07:40 PM |
| Already fixed, thanks anyways. |
|
|
| Report Abuse |
|
|