How could I make this?

How could I make something like this:

The player’s mouse is locked in the centre of the screen and when they move it acts like shiftlock, but they can still looking in all directions while stationary without their character moving and with the mouse still staying in the centre of the screen.

How could I make that?

Any help appreciated!

1 Like

To be honest I’m not entirely sure because I’ve never done something like that. But it sure looks like a custom-made camera system to me. Maybe using RunService and mouse input you could create something similar. You would then need to use the mouse input to rotate the camera accordingly and check whether the player is moving. If the player is moving you will rotate him (so its like shift lock) and if he isn’t, you will let the player look around with the camera. Of course, you would need to make the subject of the camera the player, so it will give off the POV you want it to.

Again I’m not too sure if that’s the right way to go, but as far as I know that’s what I’d do to achieve something like this.

I believe what you are looking for is MouseBehavior
UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter

That seems like a very long-winded way of doing it.

Unfortunately this doesn’t work.

Works fine for me
https://gyazo.com/39c08ef404339e3ce517dde45ce7eb12

Perhaps you are using it wrong?
Try pasting this into the command bar

task.wait(2) game.UserInputService.MouseBehavior = Enum.MouseBehavior.LockCenter
2 Likes

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.