Hello I’m working on a dive mechanic for my game as seen below.
My dive works so that it changes the humanoids velocity pushing them forward, and changing their CFrame ,before finally changing the humanoids state to physics. When I’m not in shiftlock its as intended but when I enter shiftlock mode this happens.
https://imgur.com/a/7qE5CLU
Is there anything I can do to make my player not freak out when diving in shiftlock?
Thanks for any help.
local function divingforward()
Char.HumanoidRootPart.Velocity=Vector3.new(0,15,0) + Char.Humanoid.MoveDirection *5*plr_speed/2
wait(.055)
Char.HumanoidRootPart.Velocity=Vector3.new(0,0,3.5) + Char.Humanoid.MoveDirection *5*plr_speed/2
Char.HumanoidRootPart.CFrame=Char.HumanoidRootPart.CFrame*CFrame.new(0,1,0)*CFrame.Angles(-math.pi/5,0,0);
player.Character.Humanoid:ChangeState(Enum.HumanoidStateType.Physics)
wait(.009)
Char.HumanoidRootPart.CFrame=Char.HumanoidRootPart.CFrame*CFrame.new(0,0,0)*CFrame.Angles(-math.pi/7,0,0);
wait(.009)
Char.HumanoidRootPart.CFrame=Char.HumanoidRootPart.CFrame*CFrame.new(0,0,0)*CFrame.Angles(-math.pi/6,0,0);
end
Diving function above, A bit messy atm