I watched okeanskiy’s head movement tutorial so I could implement that into my game, but it didn’t work for R6. So I created this script that adds a Neck to the character when it spawns. (as R6 characters don’t have the motor6d neck)
game.Players.PlayerAdded:Connect(function(player)
player.CharacterAdded:Connect(function(char)
local clon = Instance.new('Motor6D', char.Head)
clon.Name = 'Neck'
clon.Part0 = char.Torso
clon.Part1 = char.Head
end)
end)
that goes into the ServerScriptService /\
local camera = workspace.CurrentCamera
local character = game.Players.LocalPlayer.Character or game.Players.LocalPlayer.Character:Wait()
local root = character:WaitForChild('HumanoidRootPart')
local neck = character:FindFirstChild('Neck', true)
local yOffset = neck.C0.Y
local CFnew, CFang, asin = CFrame.new, CFrame.Angles, math.asin
game:GetService('RunService').RenderStepped:Connect(function()
local camDirection = root.CFrame:toObjectSpace(camera.CFrame).lookVector
if neck then
neck.C0 = CFnew(0, yOffset+1.5, 0) * CFang(0, -asin(camDirection.x), 0) * CFang(asin(camDirection.y), 0, 0)
end
end)
this is okeanskiy’s script, this goes into the StarterCharacterScripts /
hope someone can use this in their EXPERIENCE