Hello!
I’m trying to make something similiar, everything works except for I don’t know how to achieve this:
While in air and moving it rolls the character around itself
I tried to mess with AlignOrientation and AngularVelocity and AssemblyAngularVelocity but nothing seems to work and there’s probably a trick to achieve this.
local runService = game:GetService("RunService")
local ball = script.Parent
local humanoid = ball:WaitForChild("Humanoid")
local head = ball:WaitForChild("Head")
local angularVelocity = head:FindFirstChildOfClass("AngularVelocity")
local function onRenderStep()
local moveDirection = humanoid.MoveDirection
if moveDirection.Magnitude > 0 then
local angularVelocityVector = Vector3.new(moveDirection.Z, 0, -moveDirection.X) * 10
angularVelocity.AngularVelocity = angularVelocityVector
else
angularVelocity.AngularVelocity = Vector3.new()
end
end
runService.RenderStepped:Connect(onRenderStep)
Any help is appreciated!