Hey, is it possible to force shift lock on a player when a certain tool is equipped? And the shift lock is disabled when the tool is unequipped?
I am currently working on a game that involves some intense 3rd person combat, and it would be great if I could enable shift lock once a player’s weapon is equipped so combat is more immersive.
If you can help, please comment down below or shoot me a DM at Raid#7008
There are quite a few threads on this (on the DevForum and externally)
I found this: How can I force shift lock? - #12 by OPPEYRADY
This takes you specifically to the answer, but the thread may aid you too.
For example:
Tool = game:GetService("ServerStorage"):WaitForChild("foo") --// your tool here
local function toolEquipped(Mouse)
-- force shift lock here (from the thread)
Tool.Equipped:Connect(toolEquipped)
And the same with Unequipped:
Tool = game:GetService("ServerStorage"):WaitForChild("foo") --// your tool here
local function toolUnequipped(Mouse)
-- force shift lock here (from the thread)
Tool.Unequipped:Connect(toolEquipped)
Now, I’ve never done anything too similar to this, as I have never had to. Therefore, I’m not 100% sure if it works or if it’s just a workaround that the community has looked into. I can investigate further if necessary.