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: I'm really confused.

Previous Thread :: Next Thread 
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
01 Dec 2013 03:00 AM
This script's in a Localscript under ScreenGui, and it's enabled by disabled = false


game.Workspace.CurrentCamera.CoordinateFrame = CFrame.new(game.Workspace.camframe.hotel01f.Position)
game.Workspace.CurrentCamera.Focus = CFrame.new(game.Workspace.camfocuses.hotel01f.Position)
game.Workspace.CurrentCamera.CameraSubject = game.Workspace.camframe.hotel01f


The weird thing is, the camera focuses in the general direction of where I wanted it to focus. e.g the focus brick's infront of a building and the camera will still focus in the general direction of that building, even if the brick is in the oppositer direction.

The CoordinateFrame doesn't change the camera's CFrame unless I have CameraSubject on the brick as well.

And when I try to revert the camera back onto the player using

game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Custom"

The screen will go white if the CameraSubject is Humanoid, and the Camera won't follow if I set it to the Torso or the Head. However, the screen doesn't go white if I remove the CameraSubject to help the Camera get its CFrame.


any ideas? Remember, the script's in a Localscript under ScreenGui, and it's enabled by disabled = false
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
01 Dec 2013 03:13 AM
Okay, update:

I removed the CameraSubject and everything works now except for CoordinateFrame.
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
01 Dec 2013 03:32 AM
I think it's called
CFrame, try that
Report Abuse
KEVEKEV77 is not online. KEVEKEV77
Joined: 12 Mar 2009
Total Posts: 6961
01 Dec 2013 03:33 AM
instead of Coordinate Frame or wahtever
try

CFrame
Report Abuse
lawl60ftw is not online. lawl60ftw
Joined: 30 May 2009
Total Posts: 3973
01 Dec 2013 04:03 AM
Don't worry, I've fixed the problem.

Thanks for trying to help though, the problem was that I didn't understand what CameraSubject did and I was under the assumption that it was the same as CoordinateFrame and removed Focus. So I was experimenting with them all individually and noticed CameraSubject works like Focus, which makes sense as to why it would remove Focus. So I replaced CameraSubject with the focus position and everything works now.
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