If you want to disable shift lock/mouse lock then run game.StarterPlayer.EnableMouseLockOption = false in your command bar, or you can click on the StarterPlayer service and click the checkmark next to âEnableMouseLockOptionâ if youâd like to do it manually. If you do it manually here is a gif of how to do it. https://i.gyazo.com/6c91cf36d4785790406cd4da63e41c6b.mp4 (you can click it and full screen it)
the camera is top down
whe wanna set the right mouse click to enter in defence mode
currently the block button is space
but when whe set the right button to defend, the mouse not move for rotate the character while holding the right mouse button
Thatâs like trying to use the W key for âforwardâ AND âattackâ at the same time.
You are taking away the R mouse button ability to rotate the camera when you set it for âdefendâ.
I believe heâs asking if thereâs a way to script it to do both?
The issue he is having is that when you right click in the default camera mode, the client locks the mouse and uses the delta to rotate the camera.
However since his camera is custom and doesnât involve rotation at all, he wants to bind an action to RMB. But Roblox still locks the mouse in place when you hold it down, so it isnât great for gameplay as you want to be able to move your mouse.
Have you tried setting the camera mode? I believe Scriptable may be the solution to your issue
It only happens with right click. Ever noticed how annoying it is when the mouse isnât locked and youâre trying to rotate your camera?
Also Iâm not sure what you mean exactly â Iâm wasnât defending anything, I was just clarifying what the OP was trying to say and explaining why the thing causing the issue was implemented, since people werenât understanding.
the game is based in battlerite
the character rotate aways facing the mouse
right click supose to defend attacks
but if whe set the right click to defend the character stops to rotate while holding down the Right mouse button
Sorry EmeraldSlash, I shouldâve been replying to EG_Dark, not you.
I wasnât implying you were defending anything in the post, I meant in game if you right click to defendâŚ
EG_Dark answered my question though.
Character faces mouse, but upon block attacks it wonât continue to face the mouse? Hmm are you using a while true do loop? If so have you considered trying to use coroutines?
Maybe Iâm just wrong. It doesnât make much sense, you run a loop to face the mouse and above that you have a function for right click, why wouldnât it still face the mouse?