InvokeServer returning a nil value

Server Script:

function thisFunction(Player,Part)
if Player and Part then
return "Player "..Player.Name.." made "..Part.Name
end
end

game.ReplicatedStorage.RemoteFunction.OnServerInvoke = thisfunction

Local Script:

local Event = game.ReplicatedStorage.RemoteFunction
local Plr = game.Players.LocalPlayer
game.Workspace.ChildAdded:Connect(function(child)
if child:IsA("BasePart") and child.Name == "Add" then
local InvokeThing = Event:InvokeServer(child.Name)
print(InvokeThing)
end

console: prints nil

Any part or instance that is created by the client will
never be seen by the server, which is why “Part” isn’t visible to the server and is therefore assumed to be nil.

image

image

You sure there’s no error in the output?

The part is created on a server script

try

local InvokeThing = Event:InvokeServer(child)

instead of

local InvokeThing = Event:InvokeServer(child.Name)