If you try to run the suggested code from this wiki page it errors telling you that you don’t have access to that property
https://developer.roblox.com/en-us/api-reference/property/Player/DevEnableMouseLock
If you try to run the suggested code from this wiki page it errors telling you that you don’t have access to that property
https://developer.roblox.com/en-us/api-reference/property/Player/DevEnableMouseLock
I assume something is wrong with the script on the dev forum because it says
This can be set server-side during run-time by using a
Script
. It can not be set client-side.
and later it shows a client sided script, so that does not make much sense
o̶b̶s̶:̶ ̶i̶ ̶h̶a̶v̶e̶ ̶t̶r̶i̶e̶d̶ ̶t̶h̶i̶s̶ ̶a̶ ̶f̶e̶w̶ ̶m̶i̶n̶u̶t̶e̶s̶ ̶b̶e̶f̶o̶r̶e̶ ̶y̶o̶u̶ ̶a̶s̶k̶e̶d̶ ̶t̶h̶i̶s̶ ̶q̶u̶e̶s̶t̶i̶o̶n̶,̶ ̶n̶e̶i̶t̶h̶e̶r̶ ̶s̶e̶r̶v̶e̶r̶ ̶o̶r̶ ̶c̶l̶i̶e̶n̶t̶ ̶s̶i̶d̶e̶d̶ ̶w̶o̶r̶k̶e̶d̶,̶ ̶o̶n̶ ̶c̶l̶i̶e̶n̶t̶ ̶s̶i̶d̶e̶ ̶i̶t̶ ̶j̶u̶s̶t̶ ̶l̶a̶c̶k̶s̶ ̶p̶e̶r̶m̶i̶s̶s̶i̶o̶n̶ ̶a̶n̶d̶ ̶o̶n̶ ̶s̶e̶r̶v̶e̶r̶ ̶s̶i̶d̶e̶,̶ ̶a̶p̶p̶a̶r̶e̶n̶t̶l̶y̶ ̶n̶o̶t̶h̶i̶n̶g̶ ̶h̶a̶p̶p̶e̶n̶s̶.
EDIT: I am sorry, after some more testing , i noticed i was trying to a execute a server script with the client, you are going to need to use Remotes for that function (it is server sided really)
Checkout this code:
So just to clarify a little bit:
Why is this server sided?
Shiftlock seems like such a common use case in many games. Why isn’t this easier to do in a LocalScript?