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: Camera's Focus Not Working?

Previous Thread :: Next Thread 
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 04:09 PM
camera.Focus just isn't working. It's like it just skips over the code and goes on. I have this:

screengui.TextButton.MouseButton1Down:connect(function()
cam.CameraSubject = factionsmodel.CameraSubjectPart
cam.Focus = factionsmodel.CharacterStand.CFrame
plr.CameraMode = Enum.CameraMode.LockFirstPerson
cam.CameraType = Enum.CameraType.Scriptable
end)

Essentially, I just want to click the TextButton, and it will change the player's CameraSubject to a certain part and have it look at another part. The CameraMode and CameraType lines are only so the camera is in the right spot and that you can't move it. This is in a LocalScript. So is the camera.Focus just not working anymore??
Report Abuse
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 04:14 PM
Bump.
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
28 Aug 2015 04:21 PM
Focus has to be a vector3 value. so just add
..blahblahblah.CFrame.p

while true do the do
Report Abuse
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 04:25 PM
I just added in the CFrame.p, but it gave this error:

LocalScript:10: bad argument #3 to 'Focus' (CFrame expected, got Vector3)

Which basically just means that it has to be a CFrame. So I'm still at my quandary.
Report Abuse
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 04:30 PM
Buuuuummmmmp...
Report Abuse
morashsPeasant is not online. morashsPeasant
Joined: 06 Jan 2011
Total Posts: 4944
28 Aug 2015 04:32 PM
oopsies, Sorry!
I'm not sure whats wrong :(

while true do the do
Report Abuse
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 05:02 PM
Buuuuuuuuuummmmmmmmmmmmmmmmp........
Report Abuse
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 05:09 PM
This shouldn't be thaaaat hard... I'm just asking how to use Focus, since it's not working for me.
Report Abuse
Scripth is not online. Scripth
Joined: 23 Jun 2013
Total Posts: 1724
28 Aug 2015 05:11 PM
set focus after setting cameratype
Report Abuse
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 05:51 PM
That works! Thanks a ton, Scripth.
Report Abuse
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 05:56 PM
Well, actually, I THOUGHT it worked the first time I tried it. What happens is whatever direction my camera is facing before I click the gui is what it will be after changing the CameraSubject. So I tried it a few more times to be sure after I posted, and it's still like it's completely ignoring the Focus line. This is really getting frustrating for me...
Report Abuse
Scripth is not online. Scripth
Joined: 23 Jun 2013
Total Posts: 1724
28 Aug 2015 05:57 PM
Focus is where the camera points
I'd recommend using camera.CoordinateFrame as well with it
tbh you can ignore focus and just do camera.CoordinateFrame=CFrame.new(camera.CoordinateFrame.p,FOCUS_POSITION) to make it so the camera points where you want it to
Report Abuse
Veltamax is not online. Veltamax
Joined: 06 May 2012
Total Posts: 368
28 Aug 2015 06:45 PM
Thank you sooo much Scripth!! I had to do a little trial and error to get what you said to work, but now it works flawlessly! :D
If you care to see it in action, here it is xD
http://www.roblox.com/games/167842338/More-Rediculousness
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