Hello! I have a script to make the character’s humanoidRootPart rotate relative to the camera’s rotation. However, it barely works without shift lock (it works very consistently in shiftlock though). Here’s a video:
robloxapp-20240908-1236494.wmv (2.4 MB)
As you can see, it works the first time and then stops working completely. When I turn on shift lock, it works very consistently.
Here’s the code:
for i = 30, 0, -1 do
local results = checker.dashcheck(char)
if i >= 10 then
remote:FireServer("after")
end
if results then
sidedashing = true
hum.JumpPower = 0
hum.WalkSpeed = 0
print("yeh")
char.HumanoidRootPart.CFrame = CFrame.lookAt(char.HumanoidRootPart.Position,Vector3.new(workspace.CurrentCamera.CFrame.Position.X, 0 , workspace.CurrentCamera.CFrame.Position.Z) * -1)
lv.VectorVelocity = workspace.CurrentCamera.CFrame.RightVector * i * 3
else
sidedashing = false
if lv then
lv.VectorVelocity = Vector3.new(0,0,0)
end
end
task.wait()
end
Thank you in advance!