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: Camera

Previous Thread :: Next Thread 
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:09 PM
local cam = workspace.CurrentCamera
cam.CameraSubject=workspace.CAMERA1
cam.CameraType = "Attach"
local target = workspace.CAMERA1
local camera = workspace.CurrentCamera
camera.CameraSubject = target
local angle = 4

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

wait(30)
game.Workspace.CurrentCamera.CameraSubject = game.Players.LocalPlayer.Character.Humanoid
game.Workspace.CurrentCamera.CameraType = "Scriptable"



This script is working fine, the only problem is I wish for the camera to be still. Players can move it around and it glitch. I want this to begone.
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:12 PM
Bump
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:17 PM
Bump 2
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:22 PM
Bump 3
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:33 PM
Does nobody know this?
Report Abuse
ObsessedwithMario is not online. ObsessedwithMario
Joined: 03 Mar 2012
Total Posts: 268
31 Jul 2014 02:44 PM
Try
cam.CameraType = 6
instead of
cam.CameraType = "Attach"
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:47 PM
Then the Camera is in an unknown location, way far from where it is.
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:48 PM
It also keeps spinning, I do not want it to spin.
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:51 PM
Bump
Report Abuse
ObsessedwithMario is not online. ObsessedwithMario
Joined: 03 Mar 2012
Total Posts: 268
31 Jul 2014 02:53 PM
Do
camera.CoordinateFrame = CFrame.new(target.Position)
instead of
while wait() do
camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part
* CFrame.Angles(0, angle, 100) --Rotate by the angle
* CFrame.new(0, 150, -50) --Move the camera backwards 5 units
angle = angle + math.rad(1)
end
?
I don't really know.
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:55 PM
It is still in an unknown location.
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 02:59 PM
Nevermind I fixed it.
Report Abuse
ObsessedwithMario is not online. ObsessedwithMario
Joined: 03 Mar 2012
Total Posts: 268
31 Jul 2014 03:01 PM
camera.CoordinateFrame = CFrame.new(target.Position) --Start at the position of the part
* CFrame.Angles(0, angle, 100) --Rotate by the angle
* CFrame.new(0, 150, -50) --Move the camera backwards 5 units
In the same place.

Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 03:03 PM
Obsessed, it's not working.
Still same problem, and when I said I fixed it, it broke after I posted that.
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 03:10 PM
Bump!
Report Abuse
ObsessedwithMario is not online. ObsessedwithMario
Joined: 03 Mar 2012
Total Posts: 268
31 Jul 2014 03:17 PM
I'm clueless at this point sorry. I'm using the same script as you in my place, and it works fine. I don't know why yours isn't working. Again, sorry :(
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 03:19 PM
Mine is working fine, it's just move-able.
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 03:36 PM
Bump.
Report Abuse
Accomplishable is not online. Accomplishable
Joined: 13 Aug 2009
Total Posts: 6207
31 Jul 2014 03:38 PM
Change the camera type to scriptable.
Report Abuse
dansk is not online. dansk
Joined: 24 Dec 2008
Total Posts: 548
31 Jul 2014 03:44 PM
Scriptable camera type wont move
Report Abuse
Vencorr is not online. Vencorr
Joined: 31 Jan 2010
Total Posts: 5023
31 Jul 2014 03:56 PM
But why is the camera spinning?
Report Abuse
dansk is not online. dansk
Joined: 24 Dec 2008
Total Posts: 548
31 Jul 2014 10:45 PM
The camera is probably spinning because of your script. since you are using CFrame.Angles in a loop, im assuming you wanted it to spin. If you want it stationary, an easy way is
cam.CameraType = "Scriptable"
cam.CameraSubject = game.Workspace.(target)
cam.CoordinateFrame = game.Workspace.(target).CFrame
cam.Focus = game.Workspace.(target).CFrame.

(Also why do you have 2 variables called cam AND camera since they are the same thing?) Changing the camera type to scriptable will prevent any players from moving it.
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