How to stop shift lock from overriding align orientation?

Hello im trying to make 2 players face each other using AlignOrientation to recreate the sonic sway from db sparking zero (budokai tenkaichi) and this is how it looks normally:

The problem is that if shift lock is turned on during it,The align orientation is ignored and the player can look wherever they want which messes up the movement part of the script. Is there a way to stop this from happening ?

	local AO2 = Instance.new("AlignOrientation",Character.HumanoidRootPart)
	AO2.Attachment0 = Character.HumanoidRootPart.RootAttachment
	AO2.Mode = Enum.OrientationAlignmentMode.OneAttachment
	AO2.MaxTorque = math.huge
	AO2.CFrame = CFrame.lookAt((Character.HumanoidRootPart.Position(enCharacter.HumanoidRootPart.Position))
	AO2.Responsiveness = 400
				game.Debris:AddItem(AO2,3.3)
  • Player.DevEnableMouseLock = false
  • Humanoid.AutoRotate = false

Disable these first thing before anything else relating to rotation and that should fix your problem.

1 Like

Thanks but what if I want players to use shift lock throughout the whole game? because thats what makes the fighting far easier. I want the shift lock to still be β€œon” during the sonic sway, but just not change the orientation of the character until after the sonic sway, as forcefully turning off their shift lock for a short animation and them having to turn it on again themselves would be annoying for players.

Shift lock is a in-built feature, so it overrides dev-induced features like align orientation. The only option I can think of is building custom shift lock and simply stop listening for mouse changes during the sonic sway

Is there some sort of function in the built in shift lock module script that I can call

Just re-enable afterwards. Granted they would need to re-shift lock in which following @MysteryX2076’s advice of making your own shift-lock mechanic is advised.