Eggnivia
|
  |
| Joined: 30 May 2009 |
| Total Posts: 4144 |
|
|
| 21 Jun 2014 04:24 PM |
Because I just thought you'd enter a number, eg.
Mouse.X = 408
But that's not the case, because it comes up with the error "can't set value" |
|
|
| Report Abuse |
|
|
Eggnivia
|
  |
| Joined: 30 May 2009 |
| Total Posts: 4144 |
|
|
| 21 Jun 2014 04:25 PM |
Note:
player = game.Players.LocalPlayer repeat wait() until player.Character mouse = player:GetMouse() |
|
|
| Report Abuse |
|
|
badfitz99
|
  |
| Joined: 01 May 2010 |
| Total Posts: 5854 |
|
|
| 21 Jun 2014 04:26 PM |
I don't think you can
-- Scripter of Off-Topic -- |
|
|
| Report Abuse |
|
|
| |
|
Eggnivia
|
  |
| Joined: 30 May 2009 |
| Total Posts: 4144 |
|
|
| 21 Jun 2014 04:27 PM |
| Okay then, that's fine; I'll go back to the main question. Does anybody know how to lock the mouse in the center of the screen? |
|
|
| Report Abuse |
|
|
ManMinded
|
  |
| Joined: 07 Oct 2012 |
| Total Posts: 618 |
|
|
| 21 Jun 2014 04:29 PM |
| game.Workspace.CurrentCamera.CameraType = "Attached" |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 04:30 PM |
| Player.CameraMode = "LockFirstPerson" |
|
|
| Report Abuse |
|
|
Eggnivia
|
  |
| Joined: 30 May 2009 |
| Total Posts: 4144 |
|
|
| 21 Jun 2014 04:31 PM |
| With CameraMode, could you change the CameraSubject afterwards and keep the mouse locked? |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 04:31 PM |
No, HAS to be Classic.
No idea why, but that's ROBLOX for you. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 04:32 PM |
Oops,
CameraType HAS to be Classic. CameraSubject HAS to be your Character's Head. |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 04:33 PM |
There is one way that I've found however it doesn't yield nice results:
local player = game.Players.LocalPlayer local camera = workspace.CurrentCamera local mouse = player:GetMouse() player.CameraMode = "LockFirstPerson" camera.CameraType = "Scriptable"
function lockMouse() camera.CameraType = "Custom" end
function unlockMouse() camera.CameraType = "Scriptable" end
Everytime you lock the mouse, it turns your player invisible, and it will zoom in on the head. I wouldn't use this, unless it's the only method available at the time. |
|
|
| Report Abuse |
|
|
Eggnivia
|
  |
| Joined: 30 May 2009 |
| Total Posts: 4144 |
|
|
| 21 Jun 2014 04:33 PM |
| Dang flabbit. I won't bother asking about Attached, I'd just assume the same principle applies. |
|
|
| Report Abuse |
|
|
Eggnivia
|
  |
| Joined: 30 May 2009 |
| Total Posts: 4144 |
|
|
| 21 Jun 2014 04:34 PM |
| XXI that could actually work because I'm not using the player to control the game. I completely forgot about Scriptable, I'll give it a try |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 04:34 PM |
| ROBLOX is very bad at giving game developers control over user input :/ |
|
|
| Report Abuse |
|
|
| |
|
ManMinded
|
  |
| Joined: 07 Oct 2012 |
| Total Posts: 618 |
|
|
| 21 Jun 2014 04:35 PM |
not is saying:
local camera = game.Workspace.CurrentCamera local player = game.Players.LocalPlayer camera.CameraType = "Classic" camera.CameraSubject = player.Character.Head |
|
|
| Report Abuse |
|
|
ManMinded
|
  |
| Joined: 07 Oct 2012 |
| Total Posts: 618 |
|
|
| 21 Jun 2014 04:36 PM |
+
camera.CameraMode = "LockFirstPerson" |
|
|
| Report Abuse |
|
|
|
| 21 Jun 2014 04:41 PM |
No, player.CameraMode = "LockFirstPerson".
I have no idea who decided "Oh, I know! Lets put camera controls in the Player!" |
|
|
| Report Abuse |
|
|