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
 

Re: Best way to lock a camera to a CFrame

Previous Thread :: Next Thread 
Xsitsu is not online. Xsitsu
Joined: 28 Jul 2009
Total Posts: 2921
07 Dec 2014 01:32 PM
I really don't want to run a while true do loop.
What's the best and most efficient way you know of?
Report Abuse
eLunate is not online. eLunate
Joined: 29 Jul 2014
Total Posts: 13268
07 Dec 2014 01:34 PM
Set its track instance
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
07 Dec 2014 01:35 PM
cam.CameraType = "Scriptable"
cam.CameraSubject = invisiblepart

Not exactly setting it to a CFrame, but it's almost the same thing.
Report Abuse
Xsitsu is not online. Xsitsu
Joined: 28 Jul 2009
Total Posts: 2921
07 Dec 2014 01:38 PM
I should've been more specific.

I do this in my script:
camera.CameraType = "Scriptable"
camera.CoordinateFrame = game.Workspace:FindFirstChild("Camera_Pos_Init", true).CFrame

It sets the position just fine, but I can move the camera around with the arrow keys and rightclick dragging. The question I should've been asking is if I can disable these or prevent the camera from moving.
Report Abuse
Argelius is not online. Argelius
Joined: 19 Jul 2010
Total Posts: 4047
07 Dec 2014 01:43 PM
You shouldn't be able to move it like that.. Are you deleting the character or something?
Report Abuse
Xsitsu is not online. Xsitsu
Joined: 28 Jul 2009
Total Posts: 2921
07 Dec 2014 01:44 PM
Yes, I probably should've mentioned that. The character is set to nil because it isn't needed for the game I'm making.
Report Abuse
KLGA is not online. KLGA
Joined: 19 Apr 2014
Total Posts: 2571
07 Dec 2014 01:45 PM
I have an old script where I do something just like that, you can't move the camera around though. Here is what mine looks like:

camera.CameraType = "Scriptable"
camera.CoordinateFrame = CFrame.new(Workspace.Looker.Position, Workspace.Target.Position)
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