How could I make this so when you move the mouse, your character rotates to where the mouse is.
So the first script is a normal script and it is located in "StarterCharacterScripts" :
local remote = Instance.new("RemoteEvent", script);
remote.Name = "Remote";
remote.OnServerEvent:connect(function(player, mouseDirection, neck)
neck.C1 = CFrame.new(Vector3.new(0, -0.5, 0)) * CFrame.Angles(-math.asin(mouseDirection.y), 0, 0)
end)
After that, the second script (local) is in the first script, and here it is :
local player = game.Players.LocalPlayer;
local runService = game:GetService("RunService").Heartbeat;
local playerMouse = player:GetMouse();
local remote = script.Parent:WaitForChild("Remote");
local character = player.Character;
local humanoid = character:FindFirstChild("Humanoid");
local head = character:FindFirstChild("Head");
local neck = head ~= nil and head:FindFirstChild("Neck") or nil;
local lastMousePosition = playerMouse.UnitRay.Direction.unit;
runService:connect(function()
if head ~= nil then
if neck ~= nil and lastMousePosition ~= playerMouse.UnitRay.Direction.unit then
remote:FireServer(playerMouse.UnitRay.Direction.unit, neck);
lastMousePosition = playerMouse.UnitRay.Direction.unit;
else
neck = head ~= nil and head:FindFirstChild("Neck") or nil;
end
else
head = character:FindFirstChild("Head");
end
end)
What this script does, it makes the head follow the mouse for a R15 character.
Thanks for your help!

2 comments
Where did you inserted this local script?
nvm I found it, thanks for the help :D !