I am creating a slide ability that changes the cameraoffset of my humanoid to create a more realistic feel. The only problem I have is the cameraoffset I created is being overridden by something else and does not change. The cameraoffset works within every other situation except for when I am in first person with shift lock enabled. I have tried tampering with the PlayerModule but could not find a solution.
local function SLIDE()
humanoid.CameraOffset = Vector3.new(0,-2.5,0)
end
If i understood your topic correctly: you are basically want to change offset of the shiftlock.
Copy the PlayerModule in StarterPlayer.StarterPlayerScripts while you are in testing mode.
Stop the test and paste it into the same place so we can change it and Roblox won’t override it.
So what are you looking for is in the MouseLockController module script.
You can go check the 108th line. Your offset value should be there. Change it as you wish.
If you want to make it accessable from every script easily (so you can change it with the other scripts easily), i can advise you to put it on shared or _G table. (like: shared.ShiftLockOffset = offsetValueObj)
Thank you it works very well, but I may have worded my question in a confusing way. I was wondering If I could change the cameraoffset within firstperson with shiftlocked enabled, as it seems something different than your solution is overriding it.