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
|
  |
| Joined: 06 May 2012 |
| Total Posts: 368 |
|
| |
|
|
| 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
|
  |
| 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
|
  |
| Joined: 06 May 2012 |
| Total Posts: 368 |
|
| |
|
|
| 28 Aug 2015 04:32 PM |
oopsies, Sorry! I'm not sure whats wrong :(
while true do the do |
|
|
| Report Abuse |
|
|
Veltamax
|
  |
| Joined: 06 May 2012 |
| Total Posts: 368 |
|
|
| 28 Aug 2015 05:02 PM |
| Buuuuuuuuuummmmmmmmmmmmmmmmp........ |
|
|
| Report Abuse |
|
|
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
|
  |
| Joined: 23 Jun 2013 |
| Total Posts: 1724 |
|
|
| 28 Aug 2015 05:11 PM |
| set focus after setting cameratype |
|
|
| Report Abuse |
|
|
Veltamax
|
  |
| Joined: 06 May 2012 |
| Total Posts: 368 |
|
|
| 28 Aug 2015 05:51 PM |
| That works! Thanks a ton, Scripth. |
|
|
| Report Abuse |
|
|
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
|
  |
| 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
|
  |
| 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 |
|
|