How do i can i make the humanoid root part be able to aim up and down in shiftlock?

i want to replicate being able to aim up and down during a move like in Jujutsu Shenanigans

For reference:

What i want to apply it too:

ima keep it a stack, i have NO idea how to start the script :skull::pray: (mb) ((im in need of desperate help))

The game uses alignposition and alignorientation to make the character face at the cursor position

3 Likes

hello, heres an example where when you press E, it’s practically remade shiftlock since your character looks at the mouse except we include the y axis angle

local lookatcursor = false
local plr = game:GetService("Players").LocalPlayer
local mouse = plr:GetMouse()
local camera = workspace.CurrentCamera
local character = plr.Character or plr.CharacterAdded:Wait()
local uis = game:GetService("UserInputService")
local hrp = character:WaitForChild("HumanoidRootPart")

uis.InputBegan:Connect(function(inp, gps)
if gps then return end
if inp.KeyCode==Enum.KeyCode.E then
lookatcursor = not lookatcursor
end
end)

game:GetService("RunService").RenderStepped:Connect(function()
if not lookatcursor then return end
local lookat = (camera.CFrame.Position-hrp.Position).Unit*1000 -- you may need to make it -1000 if character is facing the wrong way
hrp.CFrame = CFrame.new(hrp.Position, lookat)
-- it's probably a simpler version of jujutsu shenanigans but i hope you get the gist of it, they couldve used alignorientation if it was much smoother
end)
1 Like