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
 

ROBLOX Cameras...

Previous Thread :: Next Thread 
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
06 Nov 2014 06:51 AM
I can't get them working at all how I want it to. All I want is the camera to move near a brick and look at it. This is what I have that keeps breaking:

cam = workspace.Camera
cam.CameraType = "Scriptable"
wait(5)
while wait() do
wait()
pos = CFrame.new(0,0,20)
targ = workspace.CamPart
cam.CoordinateFrame = CFrame.new(pos)
cam.Focus = CFrame.new(targ.Position)
end

cam.CameraType = "Custom"


| devTools || Builder | Forumer | Beginning Scripter | Add 1.5k Posts |
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
06 Nov 2014 06:52 AM
Output:
"Players.devTools.PlayerGui.LocalScript:8: bad argument #1 to 'new' (Vector3 expected, got userdata)"


| devTools || Builder | Forumer | Beginning Scripter | Add 1.5k Posts |
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
06 Nov 2014 07:03 AM
1


| devTools || Builder | Forumer | Beginning Scripter | Add 1.5k Posts |
Report Abuse
devTools is not online. devTools
Joined: 06 Sep 2014
Total Posts: 7950
06 Nov 2014 07:22 AM
2
Does anyone know why I can't seem to get cameras to work?


| devTools || Builder | Forumer | Beginning Scripter | Add 1.5k Posts |
Report Abuse
LeitrisArcade is not online. LeitrisArcade
Joined: 15 May 2010
Total Posts: 2127
06 Nov 2014 07:42 AM
"Vector3 expected, got userdata"

You tried to put a CFrame in a CFrame. That's a nono

You said
"pos = CFrame.new(0,0,20)" and "cam.CoordinateFrame = CFrame.new(pos)"

"pos" should be a Vector3

( ͡ಠ ͜ʖಠ)
Report Abuse
LeitrisArcade is not online. LeitrisArcade
Joined: 15 May 2010
Total Posts: 2127
06 Nov 2014 07:42 AM
Or you could just say "cam.CoordinateFrame = pos"

( ͡ಠ ͜ʖಠ)
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