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: CameraSubject and Focus

Previous Thread :: Next Thread 
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 02:29 PM
This is what I have:

function Spectate()
camera.CameraSubject = game.Workspace.Elevator.CamSubject
camera.CoordinateFrame = CFrame.new(game.Workspace.Elevator.Camera.Position)
camera.Focus = CFrame.new(-1, 3, 21.8)
camera.CameraType = "Scriptable"
end

Yes, it gets called.

My problem? The focus part doesn't do anything. No errors, but the camera doesn't focus on the CFrame listed above.

Any ideas?
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 02:38 PM
No one?
Report Abuse
CERE4LKILLER is not online. CERE4LKILLER
Joined: 04 Dec 2011
Total Posts: 138
12 Jan 2014 02:45 PM
try
camera.CameraSubject = a part at the position
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 02:50 PM
I did this:

camera.CameraSubject = game.Workspace.Elevator.CamSubject.Position

That errored...

I also did this:

camera.CameraSubject = (game.Workspace.Elevator.CamSubject.Position)


Same problem...
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 03:00 PM
Anyone?
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
12 Jan 2014 03:03 PM
Where did you get the camera value from? I'm pretty sure you should include

function Spectate(camera)
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 03:04 PM
Oh, sorry.

I have this too:

local camera = game.Workspace.CurrentCamera
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
12 Jan 2014 03:05 PM
This is in a localscript, correct?
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 03:06 PM
Yes
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
12 Jan 2014 03:07 PM
Ayyye I see your problem, you set the scriptable camera type AFTER you defined your values. Roblox won't do anything if it's not scriptable and it won't error.
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 03:10 PM
I have no idea what you are getting at there. I put
camera.CameraType = "Scriptable"
above everything (right below the function) and still the same problem. I don't think I have to say the camera type before...
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 03:17 PM
The thing that doesn't work is the Focus.

It won't focus the camera to the coordinates.
Report Abuse
VanillaLight is not online. VanillaLight
Joined: 02 Nov 2013
Total Posts: 834
12 Jan 2014 03:23 PM
Oh what a ding-dong I am, CFrame is not an acceptable value for the focus, you need to have a vector3 value, hence

camera.Focus = Vector3.new(-1, 3, 21.8)
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 03:23 PM
Anyone have an idea?
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 03:34 PM
*Softly cries*


lol
Report Abuse
TheLuaWeaver is not online. TheLuaWeaver
Joined: 09 Feb 2010
Total Posts: 1504
12 Jan 2014 03:44 PM
With the Scriptable camera type, you don't get to use Focus/CameraSubject.

~LuaWeaver; Programmer, gamer, developer.
Report Abuse
TheJKM98 is not online. TheJKM98
Joined: 20 Dec 2010
Total Posts: 511
12 Jan 2014 07:32 PM
Thanks
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