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: Simple Camera Script Not Working

Previous Thread :: Next Thread 
IHackedYouz is not online. IHackedYouz
Joined: 03 Oct 2011
Total Posts: 66
24 Jul 2012 10:07 AM
local camera = game.Workspace.CurrentCamera
local newcamera = Instance.new("Camera")
camera.Parent = game.Lighting
newcamera.Parent = game.Workspace
newcamera.CameraSubject = game.Workspace.CutScene1.Cams.Cam1
wait(10)
newcamera:remove()
camera.Parent = game.Workspace

It is in a LocalScript,which gets cloned into the players PlayerGui.It does change the players camera to the newcamera,but it's subject seems to be the middle of the map,not Cam1.
Report Abuse
Windburnt is not online. Windburnt
Joined: 16 Jul 2012
Total Posts: 144
24 Jul 2012 10:09 AM
Are you sure you can create cameras using 'Instance.new'?
Report Abuse
IHackedYouz is not online. IHackedYouz
Joined: 03 Oct 2011
Total Posts: 66
24 Jul 2012 10:13 AM
Yes,that is what 1dev2 does for his place when you enter,he creates a new camera and puts the old one in the lighting until the script is done.
Report Abuse
Windburnt is not online. Windburnt
Joined: 16 Jul 2012
Total Posts: 144
24 Jul 2012 10:16 AM
I can't find anything wrong in the script, then. Any output?
Report Abuse
IHackedYouz is not online. IHackedYouz
Joined: 03 Oct 2011
Total Posts: 66
24 Jul 2012 10:17 AM
It's in a LocalScript, so you can't see the output from it.
Report Abuse
Windburnt is not online. Windburnt
Joined: 16 Jul 2012
Total Posts: 144
24 Jul 2012 10:22 AM
The only thing I can find that might be wrong is this line: "newcamera.CameraSubject = game.Workspace.CutScene1.Cams.Cam1"

Is the hierarchy right?
Report Abuse
IHackedYouz is not online. IHackedYouz
Joined: 03 Oct 2011
Total Posts: 66
24 Jul 2012 10:29 AM
Yes it is,but I just fixed it anyway,you have to use camera.CoordinateFrame and camera.Focus
But thanks anyway!
Report Abuse
Windburnt is not online. Windburnt
Joined: 16 Jul 2012
Total Posts: 144
24 Jul 2012 10:30 AM
Sorry, I don't have much experience on camera manipulation!
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