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 script not working,(i can't see the error myself)

Previous Thread :: Next Thread 
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
03 Apr 2013 11:11 AM
can you please correct it for me? i don't happen to see the error,

output:
18:07:17.302 - Players.Player1.PlayerGui.LocalScript:12: ')' expected near ','

script:

1 local cam = Workspace.Camera
2 local airport = game.players[name].PlayerGui.Airport.Value
3
4 function onKeyDown(key)
5 key = key:lower()
6
7 if key == "q" then
8 if airport == Oconee then
9
10 cam.CoordinateFrame = CFrame.new(317, 6.6, 1155.5, 0, 0, 0, 0, 0, 0, 0, 0, 0)
11
12 cam.Focus = (367, 3.4, 1134.5, 0, 0, 0, 0, 0, 0, 0, 0, 0)
13 cam.CameraType = Attach
14 cam.CameraSubject = OconeePort
15 end
16 end
17 end
18
19 Mouse.KeyDown:connect(onKeyDown)
Report Abuse
cheesecake123456 is not online. cheesecake123456
Joined: 01 Jun 2009
Total Posts: 1529
03 Apr 2013 12:16 PM
The brackets should only contain 3 values, such as (366, 66, 4) so just remove all of those 0's from between the brackets.

Soup's on, everybody!
Report Abuse
Justin55555555555 is not online. Justin55555555555
Joined: 01 Oct 2008
Total Posts: 302
03 Apr 2013 12:24 PM
Could you try running it and tell us the script error?
Report Abuse
bourlo is not online. bourlo
Joined: 11 Aug 2009
Total Posts: 399
03 Apr 2013 12:28 PM

cam.Focus = CFrame.new(367, 3.4, 1134.5)
Report Abuse
bourlo is not online. bourlo
Joined: 11 Aug 2009
Total Posts: 399
03 Apr 2013 12:32 PM
Focus is cleared after you set the camerasubject
Furthermore to manipulate the camera you need the camerasubject to be set to scriptable
Also try using a loop to keep the camera at the point you want.
Report Abuse
ohno1112 is not online. ohno1112
Joined: 23 Mar 2013
Total Posts: 833
03 Apr 2013 12:37 PM
Thanks guys, it works as intended now
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