-
What do you want to achieve? Keep it simple and clear!
wanted to make so that character still follow camera while autorotate is off -
What is the issue? Include screenshots / videos if possible!
make player follow camera while autorotate is off (like is autorotate is on but its not) -
What solutions have you tried so far? Did you look for solutions on the Developer Hub?
i cant really find one cuz no one search things like this
well…
this is the code i’ve had im my head but it didn’t work as expected.
heres the script that didn’t work:
local humanoid = script.Parent:WaitForChild("Humanoid")
local humRootPart = script.Parent:WaitForChild("HumanoidRootPart")
local rotX = math.deg(math.atan2(humanoid.MoveDirection.Z, humanoid.MoveDirection.X)) + 90
if humanoid.MoveDirection ~= Vector3.new(0, 0, 0) then
--print(rotX)
bodyRot = bodyRot:lerp(CFrame.Angles(0, -math.rad(rotX), 0), 0.125)
humRootPart.CFrame = CFrame.new(humRootPart.CFrame.p.X, humRootPart.CFrame.p.Y, humRootPart.CFrame.p.Z) * bodyRot
end
any help would be appreciated.
i forgot the video:
it didn’t work as well