"Argument 1 is missing or nil" even though a value has been assigned?

I am currently having trouble with a Client to Server remote event.
For some reason, the server script is having a issue receiving one of the parameters from the local script.

Local:

Author.MouseEnter:Connect(function()
	connection = UserInputService.InputBegan:Connect(function(input, gameProcessed)
		if input.UserInputType == Enum.UserInputType.MouseButton1 then
			local senderid = Author.Parent.SenderID.Value
			
			if senderid ~= nil then
				print("Opening profile "..Author.Parent.SenderID.Value)
				remote:FireServer("OPEN, MINI", senderid)
				print(senderid) --This works
			end
		end
	end)
end)

Server:

ProfileRemote.OnServerEvent:Connect(function(sender, action, item, wantedUser)
	if plr == sender then
		print(wantedUser) --This doesn't work.
		local wantedUsername
		local foundUsername, errorUsername = pcall(function()
			wantedUsername = Players:GetNameFromUserIdAsync(tonumber(wantedUser))
		end)
		if not foundUsername then
			wantedUsername = "?"
			MainRemote:FireClient(sender, false, "NOTIFY", "CORE", "An error occured while finding this user's username.")
			warn(errorUsername)
		end
		--Random stuff
	end
end)

Nvm I just realized that I made a typo in my localscript

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.