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
 

How do you "fix" a camera?

Previous Thread :: Next Thread 
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
26 Dec 2013 07:04 PM
I need to put the camera back on the player like it used to be. This is what I've done with it:

local target = workspace.CameraPart
local camera = workspace.CurrentCamera
camera.CameraType = "Scriptable"
camera.CameraSubject = target
local angle = 0

while move == true do
wait()
camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part
* CFrame.Angles(math.rad(0), math.rad(90-angle), math.rad(45)) --Rotate by the angle
* CFrame.new(45, 0, 25) --Move the camera backwards 5 units
angle = angle+1
end



This works fine, but when I disable it the camera doesnt go back to the player correctly.
Report Abuse
Jetta765214 is not online. Jetta765214
Joined: 22 Oct 2008
Total Posts: 1855
26 Dec 2013 07:06 PM
you can remove the current camera, then it should be reset
Report Abuse
kubuto2 is not online. kubuto2
Joined: 16 Jul 2008
Total Posts: 1275
26 Dec 2013 07:08 PM
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid

http://wiki.roblox.com/index.php/CameraSubject_(Property)
Report Abuse
lolb3 is not online. lolb3
Joined: 16 Jan 2010
Total Posts: 2268
26 Dec 2013 07:22 PM
Workspace.CurrentCamera.CameraType = "Custom"
Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoud
Report Abuse
ScriptOn is not online. ScriptOn
Joined: 22 Aug 2010
Total Posts: 10885
26 Dec 2013 07:40 PM
Already fixed, thanks anyways.
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