I am nearly there but ugh(i got the tick()bit from another tutorial)
Server
if script.Parent == workspace then script.Parent = game.StarterPlayer.StarterCharacterScripts;
print("Please put the 'HeadMovementServer' script into StarterPlayer.StarterCharacterScripts.");
end;
if script.Parent == game.StarterPlayer.StarterCharacterScripts then return
end;
local tweenService = game:GetService("TweenService");
local remote = script:FindFirstChild("Remote") ~= nil and script.Remote or Instance.new("RemoteEvent", script);
remote.Name = "Remote";
local debounce = tick();
remote.OnServerEvent:connect(function(player, mouseDirection, neck)
if game.Players.LocalPlayer ~= nil then return
end;
if tick()-debounce <= 0.1 then return
end;
debounce = tick();
tweenService:Create(neck, TweenInfo.new(0.099), {C1=(CFrame.new(Vector3.new(-0, -0.500000119, -0.000272244215)) * CFrame.Angles(mouseDirection, 0, 0))}):Play();
end)
Local
if script.Parent == workspace then script.Parent = game.StarterPlayer.StarterCharacterScripts;
print("Please put the 'HeadMovementServer' script into StarterPlayer.StarterCharacterScripts.");
end;
if script.Parent == game.StarterPlayer.StarterCharacterScripts then return
end;
local tweenService = game:GetService("TweenService");
local remote = script:FindFirstChild("Remote") ~= nil and script.Remote or Instance.new("RemoteEvent", script);
remote.Name = "Remote";
local debounce = tick();
remote.OnServerEvent:connect(function(player, mouseDirection, neck)
if game.Players.LocalPlayer ~= nil then return
end;
if tick()-debounce <= 0.1 then return
end;
debounce = tick();
tweenService:Create(neck, TweenInfo.new(0.099), {C1=(CFrame.new(Vector3.new(-0, -0.500000119, -0.000272244215)) * CFrame.Angles(mouseDirection, 0, 0))}):Play();
end)

2 comments
LocalPlayer will always be nil on the server. so line 16 of the server script should use the player parameter instead
ok, i will try