How would I go about making a torso rotating script kind of like the one in nicos nextbots

what I mean is in nicos nextbots when turning or pressing a/d the torso turns to the left and the right, i’ve seen some where the torso slowly starts pointing down but i want it to rotate left and right not down

i have no script because i dont know how i would go about this

im not looking for whole scripts just help

heres what i mean

robloxapp-20230131-0856503.wmv (1.1 MB)

4 Likes

it’s simple, make an loop that turns torso motor6d first to orientation like 45 degree and then make it slowly changes angle to -45 degree and whola, you can use tween service to make smooth and clear effect

1 Like

couldn’t i use Lerp since im pretty sure C0 is a cframe

and what is the motor6d for torso because i cant find it

motor6d is called something like wrist or neck, it physical object that attaches part 0 to part 1 , it has C0 cframe 0 and C1 cframe 1 that is customizable, you can modify it’s position and orientation, it’s really helpfull to use it in animations non character like humanoids

i know what a motor6d is but i dont know which one that controls the torso is because im using the neck for head rotation, could i perhaps use left hip and right hip motor6ds

if you using R6 you can’t rotate torso but if you using r15 you use wrist to rotate upper torso

then how do nicos nextbots achieve this do they use viewmodels

i never player nextbots, but they maybe used advanced animations to do that, or custom humanoid for player

thanks i will try to make my version

they using advanced viev models to do that, i’m looked at yt

i dont know anything about making one of these but i found a script if you still need one

(LOCAL SCRIPT IN STARTERCHARACTERSCRIPTS)

-- Services
local RunService = game:GetService("RunService")
local Players = game:GetService("Players")
-- Variables
local Character = script.Parent
local Humanoid = Character:WaitForChild("Humanoid")
local HumanoidRootPart = Character:WaitForChild("HumanoidRootPart")
local Head = Character:FindFirstChild("Head")
local Torso = Character:FindFirstChild("Torso") or Character:FindFirstChild("LowerTorso")
local Neck = Torso:FindFirstChild("Neck") or Head:FindFirstChild("Neck")

local RootJoint = HumanoidRootPart:FindFirstChild("RootJoint") or Torso:FindFirstChild("Root")

local function Lerp(a, b, c)
	return a + (b - a) * c
end

local Force = nil
local Direction = nil
local Value1 = 0

local RootJointC0 = RootJoint.C0
local NeckC1 = Neck.C1

RunService.RenderStepped:Connect(function()
	Force = HumanoidRootPart.Velocity * Vector3.new(1.5,0,1.5)
	if Force.Magnitude > 0.5 and Humanoid.AutoRotate == true then
		Direction = Force.Unit	
		if HumanoidRootPart.CFrame.LookVector:Dot(Direction) > 0.85 or HumanoidRootPart.CFrame.LookVector:Dot(Direction) < -0.85 then
			Value1 = 0
		elseif HumanoidRootPart.CFrame.LookVector:Dot(Direction) < -0.2 then
			Value1 = -HumanoidRootPart.CFrame.RightVector:Dot(Direction)
		else
			Value1 = HumanoidRootPart.CFrame.RightVector:Dot(Direction)
		end
	else
		Value1 = 0
	end

	RootJoint.C0 = RootJoint.C0:Lerp(RootJointC0 * CFrame.Angles(0, 0, math.rad(-Value1 * 30)), 0.12)
	Neck.C1 = Neck.C1:Lerp(NeckC1 * CFrame.Angles(0, 0, math.rad(-Value1 * 30)), 0.12)
end)

1 Like