Player not seen on server - remote event failing

Why is the remote event failing?
the leaning player is not seen by the other player and I have my remote event running

Also the function to lean in the ‘else’ is not reset :frowning:

I don’t understand what the problem is, someone could give me a hand :pray:

Character started localscript:

-- services
local runService = game:GetService("RunService")

-- player stuff
local player = game.Players.LocalPlayer
local camera = workspace.CurrentCamera
local character = player.Character

-- character stuff
local humanoid = character:WaitForChild("Humanoid")
local humanoidRootPart = character:WaitForChild("HumanoidRootPart")
local torso = character:WaitForChild("Torso")

-- put all motors inside the character into a dictionary for easy access
-- remove spaces from motor names
local motors = {}
for _, motor in pairs(character:GetDescendants()) do
	if motor:IsA("Motor6D") then
		-- gives a table with the motor as the first index, and the motor initial c0 as the second
		motors[string.gsub(motor.Name, "%s+", "")] = {motor, motor.C0}
	end
end

-- update function
function renderStepped(dt)
	if player.CameraMode == Enum.CameraMode.LockFirstPerson then
		print("Correct camera mode.")
		-- get useful motor6ds
		local root = motors["RootJoint"]
		local leftHip = motors["LeftHip"]
		local rightHip = motors["RightHip"]
		-- get angles of camera
		local y, x, z = camera.CFrame:ToEulerAnglesYXZ()
		local groundOffset = math.abs(0.5 * torso.Size.Y - 0.5 * torso.Size.Z) * math.abs(math.sin(y))
		-- rotate motor6ds
		root[1].C0 = root[2] * CFrame.fromEulerAnglesYXZ(-y, 0, 0) * CFrame.new(0, 0, -groundOffset)
		leftHip[1].C0 = leftHip[2] * CFrame.fromEulerAnglesYXZ(0, 0, y)
		rightHip[1].C0 = rightHip[2] * CFrame.fromEulerAnglesYXZ(0, 0, -y)
	else
		print("Incorrect camera mode.")
		--do whatever
		local root = motors["RootJoint"]
		local leftHip = motors["LeftHip"]
		local rightHip = motors["RightHip"]
		-- get angles of camera
		-- rotate motor6ds
		root[1].C0 = root[2] * CFrame.fromEulerAnglesYXZ(0, 0, 0) * CFrame.new(0, 0, 0)
		leftHip[1].C0 = leftHip[2] * CFrame.fromEulerAnglesYXZ(0, 0, 0)
		rightHip[1].C0 = rightHip[2] * CFrame.fromEulerAnglesYXZ(0, 0, 0)
	end
end

-- connections
local connection = runService:BindToRenderStep("updateMotors", Enum.RenderPriority.Character.Value, renderStepped)

-- events
local ReplicatedStorage = game:GetService("ReplicatedStorage")
local lookDownEvent = ReplicatedStorage:WaitForChild("lookDownEvent")

lookDownEvent:FireServer(player, connection)

server script:

local ReplicatedStorage = game:GetService("ReplicatedStorage")
local runAnimEvent = ReplicatedStorage:WaitForChild("PlayRunAnim")
local lookDownEvent = ReplicatedStorage:WaitForChild("lookDownEvent")

local players = game:GetService("Players")
local player = players.LocalPlayer



runAnimEvent.OnServerEvent:Connect(function()
	print('Connected to server!')
end)

lookDownEvent.OnServerEvent:Connect(function(player, connection)
	print('Connected to server!')
	print('look down works')
end)

image

image

you don’t need to fire player argument

you can just do

lookDownEvent:FireServer(connection)

As the previous post stated, when firing the server from a local script through the use of a RemoteEvent & calling the FireServer() function the player instance (of whom the local script pertains) which fired the server is automatically passed as an argument to the FireServer() function call. Thus when the same RemoteEvent is used in a server script to listen for the OnServerEvent event which is fired whenever FireServer() is called, a player parameter must be received/taken by the function which is connected to the OnServerEvent, this is in order to handle the player instance being sent from the FireServer() function call.

I tried but it still doesn’t work. :confused:

Likely some other issue with your script(s) then, do you see any error messages in console?

None, in fact the connection print is shown in the console