Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local cam = workspace.CurrentCamera
- local player = game.Players.LocalPlayer
- local character = player.Character or player.CharacterAdded:Wait()
- local rootpart = character:WaitForChild("HumanoidRootPart")
- local neck = character:FindFirstChild("Neck", true)
- local y = neck.C0.Y
- game:GetService("RunService").RenderStepped:Connect(function()
- if neck then
- local direction = rootpart.CFrame:ToObjectSpace(cam.CFrame).LookVector
- neck.C0 = CFrame.new(0, y, 0) * CFrame.Angles(0, -direction.X, 0) * CFrame.Angles(direction.Y, 0, 0)
- end
- end)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement