generic image
Processing...
  • Games
  • Catalog
  • Develop
  • Robux
  • Search in Players
  • Search in Games
  • Search in Catalog
  • Search in Groups
  • Search in Library
  • Log In
  • Sign Up
  • Games
  • Catalog
  • Develop
  • Robux
   
ROBLOX Forum » Game Creation and Development » Scripting Helpers
Home Search
 

Re: Moving the Camera....

Previous Thread :: Next Thread 
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
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 is not online. 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
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
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
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
16 Jun 2012 01:04 PM
-BUMP-
Report Abuse
riendeau is not online. 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 is not online. rayoma
Joined: 13 Nov 2009
Total Posts: 1911
16 Jun 2012 02:14 PM
http://wiki.roblox.com/index.php/Camera_manipulation
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
16 Jun 2012 03:44 PM
Did you read my post at all?!
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
16 Jun 2012 04:39 PM
-BUMP-
Report Abuse
mattkabag is not online. mattkabag
Joined: 13 Dec 2008
Total Posts: 3156
16 Jun 2012 04:41 PM
PUMP
Report Abuse
VietnamVeteran101 is not online. VietnamVeteran101
Joined: 22 Mar 2011
Total Posts: 152
17 Jun 2012 04:23 PM
B
U
M
P
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripting Helpers
   
 
   
  • About Us
  • Jobs
  • Blog
  • Parents
  • Help
  • Terms
  • Privacy

©2017 Roblox Corporation. Roblox, the Roblox logo, Robux, Bloxy, and Powering Imagination are among our registered and unregistered trademarks in the U.S. and other countries.



Progress
Starting Roblox...
Connecting to Players...
R R

Roblox is now loading. Get ready to play!

R R

You're moments away from getting into the game!

Click here for help

Check Remember my choice and click Launch Application in the dialog box above to join games faster in the future!

Gameplay sponsored by:
Loading 0% - Starting game...
Get more with Builders Club! Join Builders Club
Choose Your Avatar
I have an account
generic image