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 » Scripters
Home Search
 

Camera Focus not working

Previous Thread :: Next Thread 
Valtameri is not online. Valtameri
Joined: 09 Mar 2014
Total Posts: 525
01 Jan 2015 01:49 PM
When I run the following code, everything works just fine except for the third line (CurrentCamera.Focus). Rather than pointing the camera at the player's head, it looks straight along the x-axis. And yes, this is in a localscript. What's the problem?

player = game.Players.LocalPlayer
game.Workspace.CurrentCamera.CameraType = "Scriptable"
game.Workspace.CurrentCamera.CoordinateFrame = game.Workspace.CameraPos.CFrame
game.Workspace.CurrentCamera.Focus = player.Character.Head.CFrame
Report Abuse
Valtameri is not online. Valtameri
Joined: 09 Mar 2014
Total Posts: 525
01 Jan 2015 03:57 PM
Bump

~~ Bring back Scripting Helpers! ~~
Report Abuse
RCTarzan2311 is not online. RCTarzan2311
Joined: 28 May 2014
Total Posts: 51
01 Jan 2015 04:17 PM
Maybe this will work?

player = game.Players.LocalPlayer
game.Workspace.CurrentCamera.CameraType = "Scriptable"
game.Workspace.CurrentCamera.CoordinateFrame = game.Workspace.CameraPos.CFrame
game.Workspace.CurrentCamera.CameraSubject = player.Character.Head

--I hope it works for you.
Report Abuse
robomax11 is not online. robomax11
Joined: 07 Jul 2011
Total Posts: 6828
01 Jan 2015 04:20 PM
lookVector my friend



can i have some math.pi pls. i perfer chery!
Report Abuse
Valtameri is not online. Valtameri
Joined: 09 Mar 2014
Total Posts: 525
01 Jan 2015 08:09 PM
@RCTarzan2311
Already tried that, it doesn't work.

@robomax11
lookVector would only work if I wanted the camera to look in the direction that the CameraPos part is facing (which I don't want).

~~ Bring back Scripting Helpers! ~~
Report Abuse
Previous Thread :: Next Thread 
Page 1 of 1
 
 
ROBLOX Forum » Game Creation and Development » Scripters
   
 
   
  • 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