|
| 16 Jun 2012 11:05 AM |
Hi, I've been reading the Camera Manipulation script on the Roblox Wiki, I'm using the rotating camera effect at the start of my game. Unfortunately their code for returning the camera to the players Humanoid isn't working. Here it is.
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid game.Workspace.CurrentCamera.CameraType = "Custom"
I did everything they said to do, including put it in a LocalScript, and it still doesn't work properly.
It does return the camera to the player, but it doesn't allow the player to rotate the camera, and it messes up the controls. Incase it helps, I'll put the rotating camera script here.
local target = workspace.Part local camera = workspace.CurrentCamera camera.CameraSubject = target local angle = 0 while wait() do camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part * CFrame.Angles(0, angle, 0) --Rotate by the angle * CFrame.new(0, 0, -5) --Move the camera backwards 5 units angle = angle + math.rad(1) end
Thats it, If someone can help me with my problem I would be gratefull, and I'll give credit. |
|
|
| Report Abuse |
|
|
pauljkl
|
  |
| Joined: 23 Oct 2008 |
| Total Posts: 9364 |
|
|
| 16 Jun 2012 11:09 AM |
while wait() do would run indefinitely
while Workspace.CurrentCamera.CameraSubject ~= game.Players.LocalPlayer.Character.Humanoid do
The above will stop looping once the CameraSubject is on the Humanoid |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2012 11:14 AM |
| Sorry, I'm a basic scripter. Which part of the code do i copy, and where do I put it? |
|
|
| Report Abuse |
|
|
| |
|
riendeau
|
  |
| Joined: 09 Sep 2010 |
| Total Posts: 483 |
|
|
| 16 Jun 2012 01:12 PM |
| This is not a spam! JOIN LLR O_O! |
|
|
| Report Abuse |
|
|
rayoma
|
  |
| Joined: 13 Nov 2009 |
| Total Posts: 1911 |
|
|
| 16 Jun 2012 02:14 PM |
| http://wiki.roblox.com/index.php/Camera_manipulation |
|
|
| Report Abuse |
|
|
|
| 16 Jun 2012 03:44 PM |
| Did you read my post at all?! |
|
|
| Report Abuse |
|
|
| |
|
mattkabag
|
  |
| Joined: 13 Dec 2008 |
| Total Posts: 3156 |
|
| |
|
| |
|